[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.92, 1.93

Ivan,,, ivan at wavetail.420.am
Sat Aug 29 11:51:43 PDT 2009


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

Modified Files:
	MyAccount.pm 
Log Message:
hopefully fix self-service when not using real-time gateway

Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- MyAccount.pm	22 Aug 2009 00:22:08 -0000	1.92
+++ MyAccount.pm	29 Aug 2009 18:51:41 -0000	1.93
@@ -209,12 +209,12 @@
 
   $info->{hide_payment_fields} =
   [
-    map { FS::payby->realtime($_) &&
-          $cust_main
-            ->agent
-            ->payment_gateway( 'method' => FS::payby->payby2bop($_) )
-            ->gateway_namespace
-            eq 'Business::OnlineThirdPartyPayment'
+    map { return 0 unless FS::payby->realtime($_);
+          my $pg = $cust_main->agent->payment_gateway(
+            'method'  => FS::payby->payby2bop($_),
+            'nofatal' => 1,
+          ) or return 0;
+          $pg->gateway_namespace eq 'Business::OnlineThirdPartyPayment';
         }
     @{ $info->{cust_paybys} }
   ];
@@ -469,12 +469,12 @@
 
   $return{hide_payment_fields} =
   [
-    map { FS::payby->realtime($_) &&
-          $cust_main
-            ->agent
-            ->payment_gateway( 'method' => FS::payby->payby2bop($_) )
-            ->gateway_namespace
-            eq 'Business::OnlineThirdPartyPayment'
+    map { return 0 unless FS::payby->realtime($_);
+          my $pg = $cust_main->agent->payment_gateway(
+            'method'  => FS::payby->payby2bop($_),
+            'nofatal' => 1,
+          ) or return 0;
+          $pg->gateway_namespace eq 'Business::OnlineThirdPartyPayment';
         }
     @{ $return{cust_paybys} }
   ];



More information about the freeside-commits mailing list