From 44cff6ff89f50eb856dee0adb8fab6b1abd5310b Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Wed, 30 Jan 2019 01:27:44 -0500 Subject: [PATCH] RT# 82010 Fix bug where selfservice payment form may not appear --- FS/FS/ClientAPI/MyAccount.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index a3198611d..7d49c87e1 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -930,6 +930,12 @@ sub payment_info { $return{credit_card_surcharge_percentage} = $conf->config('credit-card-surcharge-percentage', $cust_main->agentnum); $return{credit_card_surcharge_flatfee} = $conf->config('credit-card-surcharge-flatfee', $cust_main->agentnum); + # A value for 'payby' must be defined in %return + $return{payby} = $return{paybys}->[0] + if !$return{payby} + && ref $return{paybys} + && scalar @{ $return{paybys} }; + return { 'error' => '', %return, }; -- 2.20.1