diff options
author | ivan <ivan> | 2009-08-29 18:51:41 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-08-29 18:51:41 +0000 |
commit | 07560581aedba753147fcb3f6a5e7c30bdc2f77f (patch) | |
tree | 1646594170034378ba7370fc2a06f9aba191e7d7 /FS/FS/ClientAPI | |
parent | 5fa87de945b13859c422a3753d66fb7754c814b4 (diff) |
hopefully fix self-service when not using real-time gateway
Diffstat (limited to 'FS/FS/ClientAPI')
-rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index e1d4c92..b734424 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -209,12 +209,12 @@ sub access_info { $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 @@ sub payment_info { $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} } ]; |