diff options
author | ivan <ivan> | 2007-10-27 04:46:05 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-10-27 04:46:05 +0000 |
commit | 9ed8adbf1ab5aba8181903e9c262f2b69dba6cbc (patch) | |
tree | cb1474ff04a974f356db758a01c8299c9a7b0a6e /httemplate/misc/process/payment.cgi | |
parent | cb008af3d5847be4e31f5f67e3ac017b8adea58f (diff) |
simple payment receipts in web interface, sorry arnie, RT#2738
Diffstat (limited to 'httemplate/misc/process/payment.cgi')
-rw-r--r-- | httemplate/misc/process/payment.cgi | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi index 6377b13e8..71a4891cf 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -1,11 +1,18 @@ -<% include( '/elements/header.html', ucfirst($type{$payby}). ' processing successful', - include('/elements/menubar.html'), +% if ( $cgi->param('batch') ) { - ) -%> -<% include( '/elements/small_custview.html', $cust_main, '', '', popurl(3). "view/cust_main.cgi" ) %> + <% include( '/elements/header.html', ucfirst($type{$payby}). ' processing successful', + include('/elements/menubar.html'), -<% include('/elements/footer.html') %> + ) + %> + + <% include( '/elements/small_custview.html', $cust_main, '', '', popurl(3). "view/cust_main.cgi" ) %> + + <% include('/elements/footer.html') %> + +% } else { +<% $cgi->redirect(popurl(3). "view/cust_pay.html?paynum=$paynum" ) %> +% } <%init> #some false laziness w/MyAccount::process_payment @@ -99,6 +106,7 @@ if ( $payby eq 'CHEK' ) { } my $error = ''; +my $paynum = ''; if ( $cgi->param('batch') ) { $error = $cust_main->batch_card( @@ -110,18 +118,19 @@ if ( $cgi->param('batch') ) { map { $_ => $cgi->param($_) } @{$payby2fields{$payby}} ); - errotpage($error) if $error; + errorpage($error) if $error; } else { $error = $cust_main->realtime_bop( $FS::payby::payby2bop{$payby}, $amount, - 'quiet' => 1, - 'manual' => 1, - 'payinfo' => $payinfo, - 'paydate' => "$year-$month-01", - 'payname' => $payname, - 'payunique' => $payunique, - 'paycvv' => $paycvv, + 'quiet' => 1, + 'manual' => 1, + 'payinfo' => $payinfo, + 'paydate' => "$year-$month-01", + 'payname' => $payname, + 'payunique' => $payunique, + 'paycvv' => $paycvv, + 'paynum_ref' => \$paynum, map { $_ => $cgi->param($_) } @{$payby2fields{$payby}} ); errorpage($error) if $error; |