[freeside-commits] freeside/FS/FS cust_main.pm, 1.271.2.10, 1.271.2.11 Conf.pm, 1.180.2.9, 1.180.2.10
Kristian Hoffmann,420,,
khoff at wavetail.420.am
Wed Jun 6 13:02:35 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv3256
Modified Files:
Tag: FREESIDE_1_7_BRANCH
cust_main.pm Conf.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. (Backport)
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.180.2.9
retrieving revision 1.180.2.10
diff -u -d -r1.180.2.9 -r1.180.2.10
--- Conf.pm 29 Apr 2007 23:30:50 -0000 1.180.2.9
+++ Conf.pm 6 Jun 2007 20:02:33 -0000 1.180.2.10
@@ -2112,6 +2112,15 @@
'type' => 'text',
},
+ {
+ 'key' => 'disable_void_after',
+ 'section' => 'billing',
+ 'description' => 'Number of seconds after which freeside won\'t attempt to VOID a payment first when performing a refund.',
+ 'type' => 'text',
+ },
+
+
+
);
1;
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.271.2.10
retrieving revision 1.271.2.11
diff -u -d -r1.271.2.10 -r1.271.2.11
--- cust_main.pm 24 Apr 2007 22:36:23 -0000 1.271.2.10
+++ cust_main.pm 6 Jun 2007 20:02:33 -0000 1.271.2.11
@@ -3032,8 +3032,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