diff options
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/ClientAPI/MasonComponent.pm | 2 | ||||
-rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 3 | ||||
-rw-r--r-- | FS/FS/cust_main/Billing_Realtime.pm | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/FS/FS/ClientAPI/MasonComponent.pm b/FS/FS/ClientAPI/MasonComponent.pm index 493e0c0c2..3a4bfe133 100644 --- a/FS/FS/ClientAPI/MasonComponent.pm +++ b/FS/FS/ClientAPI/MasonComponent.pm @@ -62,7 +62,7 @@ my %session_callbacks = ( 'process-display' => scalar($conf->config('selfservice_process-display')), 'process-skip_first' => $conf->exists('selfservice_process-skip_first'), 'num_payments' => scalar($cust_main->cust_pay), - 'surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage')), + 'surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage', $cust_main->agentnum)), ); @$argsref = ( %args ); diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 07b1be903..7c17ae39e 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -848,7 +848,6 @@ sub payment_info { 'save_unchecked' => $conf->exists('selfservice-save_unchecked'), - 'credit_card_surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage')), }; } @@ -914,6 +913,8 @@ sub payment_info { $return{payunique} = "webui-MyAccount-$_date-$$-". rand() * 2**32; #new $return{paybatch} = $return{payunique}; #back compat + $return{credit_card_surcharge_percentage} = $conf->config('credit-card-surcharge-percentage', $cust_main->agentnum); + return { 'error' => '', %return, }; diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index ced3b236f..81b00aa72 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -436,8 +436,8 @@ sub realtime_bop { my $cc_surcharge = 0; my $cc_surcharge_pct = 0; - $cc_surcharge_pct = $conf->config('credit-card-surcharge-percentage') - if $conf->config('credit-card-surcharge-percentage') + $cc_surcharge_pct = $conf->config('credit-card-surcharge-percentage', $self->agentnum) + if $conf->config('credit-card-surcharge-percentage', $self->agentnum) && $options{method} eq 'CC'; # always add cc surcharge if called from event |