[freeside-commits] branch FREESIDE_4_BRANCH updated. 39c94b6c0fc2135ef34ec98fe657eaa1d3c2a91f
Jonathan Prykop
jonathan at 420.am
Fri Oct 9 21:55:09 PDT 2015
The branch, FREESIDE_4_BRANCH has been updated
via 39c94b6c0fc2135ef34ec98fe657eaa1d3c2a91f (commit)
from a04e2f706ea48ba175d26b8c573341884bff62f1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 39c94b6c0fc2135ef34ec98fe657eaa1d3c2a91f
Author: Jonathan Prykop <jonathan at freeside.biz>
Date: Tue Oct 6 00:35:18 2015 -0500
RT#38314: Declined payment shows card as tokenized after first attempt
diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm
index e08bdae..27d2154 100644
--- a/FS/FS/cust_main/Billing_Realtime.pm
+++ b/FS/FS/cust_main/Billing_Realtime.pm
@@ -623,6 +623,7 @@ sub realtime_bop {
'_date' => '',
'payby' => $bop_method2payby{$options{method}},
'payinfo' => $options{payinfo},
+ 'paymask' => $options{paymask},
'paydate' => $paydate,
'recurring_billing' => $content{recurring_billing},
'pkgnum' => $options{'pkgnum'},
diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi
index d9299e5..efba9ed 100644
--- a/httemplate/misc/process/payment.cgi
+++ b/httemplate/misc/process/payment.cgi
@@ -74,11 +74,13 @@ $cgi->param('balance') =~ /^\s*(\-?\s*\d*(\.\d\d)?)\s*$/
my $balance = $1;
my $payinfo;
+my $paymask; # override only used by loaded cust payinfo, only implemented for realtime processing
my $paycvv = '';
if ( $payby eq 'CHEK' ) {
if ($cgi->param('payinfo1') =~ /xx/i || $cgi->param('payinfo2') =~ /xx/i ) {
$payinfo = $cust_main->payinfo;
+ $paymask = $cust_main->paymask;
} else {
$cgi->param('payinfo1') =~ /^(\d+)$/
or errorpage("Illegal account number ". $cgi->param('payinfo1'));
@@ -99,6 +101,7 @@ if ( $payby eq 'CHEK' ) {
$payinfo = $cgi->param('payinfo');
if ($payinfo eq $cust_main->paymask) {
$payinfo = $cust_main->payinfo;
+ $paymask = $cust_main->paymask;
}
$payinfo =~ s/\D//g;
$payinfo =~ /^(\d{13,16}|\d{8,9})$/
@@ -145,7 +148,8 @@ if ( $cgi->param('save') ) {
} else {
die "unknown payby $payby";
}
- $new->payinfo($payinfo); #to properly set paymask
+ $new->payinfo($payinfo); # sets default paymask, but not if it's already tokenized
+ $new->paymask($paymask) if $paymask; # in case it's been tokenized, override with loaded paymask
$new->set( 'paydate' => "$year-$month-01" );
$new->set( 'payname' => $payname );
@@ -199,6 +203,7 @@ if ( $cgi->param('batch') ) {
'manual' => 1,
'balance' => $balance,
'payinfo' => $payinfo,
+ 'paymask' => $paymask,
'paydate' => "$year-$month-01",
'payname' => $payname,
'payunique' => $payunique,
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main/Billing_Realtime.pm | 1 +
httemplate/misc/process/payment.cgi | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list