diff options
author | levinse <levinse> | 2011-01-23 20:55:15 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-01-23 20:55:15 +0000 |
commit | 5e49bc73674d20094409d2bd4d1025da0a67f700 (patch) | |
tree | 8cb58bba6bafc1b0efc68f4e11678fea5992d731 /FS | |
parent | fde8ce7591cfe115dc12b9d5ea9ff896228a81e0 (diff) |
add receipt for SS realtime CC payment, RT8498
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index dc893821e..1e060f76b 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -638,6 +638,7 @@ sub process_payment { #false laziness w/process/payment.cgi my $payinfo; my $paycvv = ''; + my $paynum = ''; if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) { $p->{'payinfo1'} =~ /^([\dx]+)$/ @@ -699,6 +700,7 @@ sub process_payment { 'payname' => $payname, 'paybatch' => $paybatch, #this doesn't actually do anything 'paycvv' => $paycvv, + 'paynum_ref' => \$paynum, 'pkgnum' => $session->{'pkgnum'}, 'discount_term' => $discount_term, 'selfservice' => 1, @@ -741,7 +743,46 @@ sub process_payment { } } - 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, }; } |