[freeside-commits] freeside/httemplate/misc/process payment.cgi, 1.9.2.4, 1.9.2.5
Ivan,,,
ivan at wavetail.420.am
Fri Oct 26 21:46:23 PDT 2007
Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail:/tmp/cvs-serv27386/httemplate/misc/process
Modified Files:
Tag: FREESIDE_1_7_BRANCH
payment.cgi
Log Message:
simple payment receipts in web interface, sorry arnie, RT#2738
Index: payment.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/payment.cgi,v
retrieving revision 1.9.2.4
retrieving revision 1.9.2.5
diff -u -d -r1.9.2.4 -r1.9.2.5
--- payment.cgi 8 Oct 2007 19:04:49 -0000 1.9.2.4
+++ payment.cgi 27 Oct 2007 04:46:21 -0000 1.9.2.5
@@ -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 @@
}
my $error = '';
+my $paynum = '';
if ( $cgi->param('batch') ) {
$error = $cust_main->batch_card(
@@ -110,18 +118,19 @@
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;
More information about the freeside-commits
mailing list