[freeside-commits] freeside/FS/FS cust_main.pm,1.283,1.284
Kristian Hoffmann,420,,
khoff at wavetail.420.am
Wed Jun 6 12:58:31 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv3149/FS
Modified Files:
cust_main.pm
Log Message:
Added 'disable_void_after' config option to disable the VOID-before-credit behavior of FS::cust_main::realtime_refund_bop after n seconds, if set. For broken gateways like SkipJack that a
pprove VOIDs for settled transactions.
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.283
retrieving revision 1.284
diff -u -d -r1.283 -r1.284
--- cust_main.pm 23 Apr 2007 03:41:29 -0000 1.283
+++ cust_main.pm 6 Jun 2007 19:58:28 -0000 1.284
@@ -3025,8 +3025,19 @@
if length($auth); #echeck/ACH transactions have an order # but no auth
#(at least with authorize.net)
+ my $disable_void_after;
+ if ($conf->exists('disable_void_after')
+ && $conf->config('disable_void_after') =~ /^(\d+)$/) {
+ $disable_void_after = $1;
+ }
+
#first try void if applicable
- if ( $cust_pay && $cust_pay->paid == $amount ) { #and check dates?
+ if ( $cust_pay && $cust_pay->paid == $amount
+ && (
+ ( not defined($disable_void_after) )
+ || ( time < ($cust_pay->_date + $disable_void_after ) )
+ )
+ ) {
warn " attempting void\n" if $DEBUG > 1;
my $void = new Business::OnlinePayment( $processor, @bop_options );
$void->content( 'action' => 'void', %content );
More information about the freeside-commits
mailing list