X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fpayment.cgi;h=2c889d73b964be37ad1ec416c4695f291e96b4b0;hp=ac102826a48f4740589d39b66d0c560affd3d1bb;hb=fca1ac5d298b3896c1c42c4ffc7bdd3bab9b8516;hpb=f89dfe02a0471e3b7ddd45d444dd1258e17f9434 diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index ac102826a..2c889d73b 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -1,41 +1,9 @@ -% -% my %type = ( 'CARD' => 'credit card', -% 'CHEK' => 'electronic check (ACH)', -% ); -% -% $cgi->param('payby') =~ /^(CARD|CHEK)$/ -% or die "unknown payby ". $cgi->param('payby'); -% my $payby = $1; -% -% $cgi->param('custnum') =~ /^(\d+)$/ -% or die "illegal custnum ". $cgi->param('custnum'); -% my $custnum = $1; -% -% my $cust_main = qsearchs( 'cust_main', { 'custnum'=>$custnum } ); -% die "unknown custnum $custnum" unless $cust_main; -% -% my $balance = $cust_main->balance; -% -% my $payinfo = ''; -% -% #false laziness w/selfservice make_payment.html shortcut for one-country -% my $conf = new FS::Conf; -% my %states = map { $_->state => 1 } -% qsearch('cust_main_county', { -% 'country' => $conf->config('countrydefault') || 'US' -% } ); -% my @states = sort { $a cmp $b } keys %states; -% -% my $paybatch = "webui-payment-". time. "-$$-". rand() * 2**32; -% -% - <% include( '/elements/header.html', "Process $type{$payby} payment" ) %> <% include( '/elements/small_custview.html', $cust_main, '', '', popurl(2) . "view/cust_main.cgi" ) %>
- + @@ -246,3 +214,37 @@ function OLiframeContent(src, width, height, name) {
<% include('/elements/footer.html') %> +<%init> + +my %type = ( 'CARD' => 'credit card', + 'CHEK' => 'electronic check (ACH)', + ); + +$cgi->param('payby') =~ /^(CARD|CHEK)$/ + or die "unknown payby ". $cgi->param('payby'); +my $payby = $1; + +$cgi->param('custnum') =~ /^(\d+)$/ + or die "illegal custnum ". $cgi->param('custnum'); +my $custnum = $1; + +my $cust_main = qsearchs( 'cust_main', { 'custnum'=>$custnum } ); +die "unknown custnum $custnum" unless $cust_main; + +my $balance = $cust_main->balance; + +my $payinfo = ''; + +#false laziness w/selfservice make_payment.html shortcut for one-country +my $conf = new FS::Conf; +my %states = map { $_->state => 1 } + qsearch('cust_main_county', { + 'country' => $conf->config('countrydefault') || 'US' + } ); +my @states = sort { $a cmp $b } keys %states; + +my $payunique = "webui-payment-". time. "-$$-". rand() * 2**32; + + + +