diff options
author | ivan <ivan> | 2009-08-29 19:05:22 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-08-29 19:05:22 +0000 |
commit | dbb986792ad5d9f4d7e409234b7a78719179dfa2 (patch) | |
tree | 619103b605ff356d82bfb6f2160b00868261445e /FS | |
parent | 07560581aedba753147fcb3f6a5e7c30bdc2f77f (diff) |
hopefully really fix self-service when not using real-time gateway
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index b73442421..73d27b544 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -209,12 +209,14 @@ sub access_info { $info->{hide_payment_fields} = [ - 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'; + map { my $pg = ''; + if ( FS::payby->realtime($_) ) { + $pg = $cust_main->agent->payment_gateway( + 'method' => FS::payby->payby2bop($_), + 'nofatal' => 1, + ); + } + $pg && $pg->gateway_namespace eq 'Business::OnlineThirdPartyPayment'; } @{ $info->{cust_paybys} } ]; @@ -469,12 +471,14 @@ sub payment_info { $return{hide_payment_fields} = [ - 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'; + map { my $pg = ''; + if ( FS::payby->realtime($_) ) { + $pg = $cust_main->agent->payment_gateway( + 'method' => FS::payby->payby2bop($_), + 'nofatal' => 1, + ); + } + $pg && $pg->gateway_namespace eq 'Business::OnlineThirdPartyPayment'; } @{ $return{cust_paybys} } ]; |