X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fpayment.cgi;h=728eba7b9930809d3179afca70de5e459563af47;hb=be10e7a1421c13eec4b1bb3676eaf5c84344e601;hp=02c6c542819f033c2c66c29b8eb0b02b9bd64cc3;hpb=f7fd2a3e34da751cbc02bbf215e99c6dc89adc15;p=freeside.git diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 02c6c5428..728eba7b9 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -1,108 +1,104 @@ -<% - my %type = ( 'CARD' => 'credit card', - 'CHEK' => 'electronic check (ACH)', - ); +% +% 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; +% +% - $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('defaultcountry') || '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 ) %> +<% include( '/elements/header.html', "Process $type{$payby} payment" ) %> +<% include( '/elements/small_custview.html', $cust_main, '', '', popurl(2) . "view/cust_main.cgi" ) %>