summaryrefslogtreecommitdiff
path: root/FS/FS/ClientAPI
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-10-16 15:11:34 -0700
committerIvan Kohler <ivan@freeside.biz>2016-10-16 15:11:34 -0700
commit65ac493e03e7bf3f8f603f8585364dd710426099 (patch)
tree81f1d4ec4480aa43aeea3e74da217f88b9114ca1 /FS/FS/ClientAPI
parent4143ca535f73cf6ffbffd2d17547686256af647d (diff)
agent-virtualize credit card surcharge percentage, RT#72961
Diffstat (limited to 'FS/FS/ClientAPI')
-rw-r--r--FS/FS/ClientAPI/MasonComponent.pm2
-rw-r--r--FS/FS/ClientAPI/MyAccount.pm3
2 files changed, 3 insertions, 2 deletions
diff --git a/FS/FS/ClientAPI/MasonComponent.pm b/FS/FS/ClientAPI/MasonComponent.pm
index 493e0c0..3a4bfe1 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 07b1be9..7c17ae3 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,
};