don't call realtime_collect for prepaid cards, fixes signup error in 3.x, RT#22151
authorIvan Kohler <ivan@freeside.biz>
Sat, 23 Mar 2013 03:25:02 +0000 (20:25 -0700)
committerIvan Kohler <ivan@freeside.biz>
Sat, 23 Mar 2013 03:25:02 +0000 (20:25 -0700)
FS/FS/ClientAPI/Signup.pm

index 2fcc4b1..1dbb20b 100644 (file)
@@ -773,13 +773,15 @@ sub new_customer {
     #     " new customer: $bill_error"
     #  if $bill_error;
 
-    $bill_error = $cust_main->realtime_collect(
-       method        => FS::payby->payby2bop( $packet->{payby} ),
-       depend_jobnum => $placeholder->jobnum,
-       selfservice   => 1,
-    );
-    #warn "$me error collecting from new customer: $bill_error"
-    #  if $bill_error;
+    unless ( $packet->{payby} eq 'PREPAY' ) {
+      $bill_error = $cust_main->realtime_collect(
+         method        => FS::payby->payby2bop( $packet->{payby} ),
+         depend_jobnum => $placeholder->jobnum,
+         selfservice   => 1,
+      );
+      #warn "$me error collecting from new customer: $bill_error"
+      #  if $bill_error;
+    }
 
     if ($bill_error && ref($bill_error) eq 'HASH') {
       return { 'error' => '_collect',