diff options
author | Mark Wells <mark@freeside.biz> | 2013-01-02 19:01:16 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-01-02 19:01:16 -0800 |
commit | e5d6af11f52aabe8c9e6e12ce43c3401ccf025a8 (patch) | |
tree | e67a2737e58566ad7d4e4b759b3bf4a542dae25d /FS/bin | |
parent | c7286ce9036d71665c2bfed9de93f87309b72d35 (diff) |
move credit card transaction results out of paybatch and into real fields, #18548
Diffstat (limited to 'FS/bin')
-rwxr-xr-x | FS/bin/freeside-void-payments | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/FS/bin/freeside-void-payments b/FS/bin/freeside-void-payments index 8c1f3dbdf..49b74d388 100755 --- a/FS/bin/freeside-void-payments +++ b/FS/bin/freeside-void-payments @@ -90,8 +90,11 @@ my $notfound = 0; my $canceled = 0; print "Voiding ".scalar(@auths)." transactions:\n" if $opt{'v'}; foreach my $authnum (@auths) { - my $paybatch = $gatewaynum . $processor . ':' . $authnum; - my $cust_pay = qsearchs('cust_pay', { paybatch => $paybatch } ); + my $cust_pay = qsearchs('cust_pay', { + gatewaynum => $gatewaynum, + processor => $processor, + authorization => $authnum, + }); my $error; my $cancel_error; if($cust_pay) { @@ -103,7 +106,11 @@ foreach my $authnum (@auths) { } } else { - my $cpv = qsearchs('cust_pay_void', { paybatch => $paybatch }); + my $cpv = qsearchs('cust_pay_void', { + gatewaynum => $gatewaynum, + processor => $processor, + authorization => $authnum, + }); if($cpv) { $error = 'already voided '.time2str('%Y-%m-%d', $cpv->void_date) . ' by ' . $cpv->otaker; |