[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.126, 1.127
Erik Levinson
levinse at wavetail.420.am
Sun Jan 23 12:55:16 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv11684/FS/FS/ClientAPI
Modified Files:
MyAccount.pm
Log Message:
add receipt for SS realtime CC payment, RT8498
Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -w -d -r1.126 -r1.127
--- MyAccount.pm 21 Jan 2011 22:17:30 -0000 1.126
+++ MyAccount.pm 23 Jan 2011 20:55:14 -0000 1.127
@@ -640,6 +640,7 @@
#false laziness w/process/payment.cgi
my $payinfo;
my $paycvv = '';
+ my $paynum = '';
if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) {
$p->{'payinfo1'} =~ /^([\dx]+)$/
@@ -701,6 +702,7 @@
'payname' => $payname,
'paybatch' => $paybatch, #this doesn't actually do anything
'paycvv' => $paycvv,
+ 'paynum_ref' => \$paynum,
'pkgnum' => $session->{'pkgnum'},
'discount_term' => $discount_term,
'selfservice' => 1,
@@ -743,7 +745,46 @@
}
}
- return { 'error' => '' };
+ my $receipt_html = '';
+ if($paynum) {
+ # currently supported for realtime CC only; send receipt data to SS
+ my $cust_pay = qsearchs('cust_pay', { 'paynum' => $paynum } );
+ if($cust_pay) {
+ $receipt_html = qq!
+<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=2>
+
+<TR>
+ <TD ALIGN="right">Payment#</TD>
+ <TD BGCOLOR="#FFFFFF"><B>! . $cust_pay->paynum . qq!</B></TD>
+</TR>
+
+<TR>
+ <TD ALIGN="right">Date</TD>
+
+ <TD BGCOLOR="#FFFFFF"><B>! .
+ time2str("%a %b %o, %Y %r", $cust_pay->_date)
+ . qq!</B></TD>
+</TR>
+
+
+<TR>
+ <TD ALIGN="right">Amount</TD>
+ <TD BGCOLOR="#FFFFFF"><B>! . $cust_pay->paid . qq!</B></TD>
+
+</TR>
+
+<TR>
+ <TD ALIGN="right">Payment method</TD>
+ <TD BGCOLOR="#FFFFFF"><B>! . $cust_pay->payby_name .' #'. $cust_pay->paymask
+ . qq!</B></TD>
+</TR>
+
+</TABLE>
+!;
+ }
+ }
+
+ return { 'error' => '', 'receipt_html' => $receipt_html, };
}
More information about the freeside-commits
mailing list