[freeside-commits] freeside/FS/FS cust_main.pm, 1.271.2.76, 1.271.2.77

Mark Wells mark at wavetail.420.am
Fri Mar 12 02:53:01 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv29204

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	cust_main.pm 
Log Message:
RT#7180: backport ECHECK_void_requires_account

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.271.2.76
retrieving revision 1.271.2.77
diff -u -w -d -r1.271.2.76 -r1.271.2.77
--- cust_main.pm	6 Nov 2009 23:39:46 -0000	1.271.2.76
+++ cust_main.pm	12 Mar 2010 10:52:59 -0000	1.271.2.77
@@ -3493,6 +3493,18 @@
   ) {
     warn "  attempting void\n" if $DEBUG > 1;
     my $void = new Business::OnlinePayment( $processor, @bop_options );
+    if( $void->can('info') ) { # backported from 1.9
+      if( $cust_pay->payby eq 'CARD' 
+          and $void->info('CC_void_requires_card') ) {
+        $content{'card_number'} = $cust_pay->payinfo;
+      }
+      elsif( $cust_pay->payby eq 'CHEK'
+              and $void->info('ECHECK_void_requires_account') ) {
+        @content{'account_number', 'routing_code'} = 
+          split('@', $cust_pay->payinfo);
+        $content{'name'} = $self->get('first') . ' ' . $self->get('last');
+      }
+    }
     $void->content( 'action' => 'void', %content );
     $void->submit();
     if ( $void->is_success ) {



More information about the freeside-commits mailing list