[freeside-commits] branch FREESIDE_3_BRANCH updated. e3414e8ef2f07df0412b5cd645213b34393078ec
Ivan
ivan at 420.am
Sun Oct 16 15:11:36 PDT 2016
The branch, FREESIDE_3_BRANCH has been updated
via e3414e8ef2f07df0412b5cd645213b34393078ec (commit)
from c7c021dcf27486b808c0aed629a28ced42bc3d03 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e3414e8ef2f07df0412b5cd645213b34393078ec
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sun Oct 16 15:11:35 2016 -0700
agent-virtualize credit card surcharge percentage, RT#72961
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 23fbf6c..3d01c0d 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -868,7 +868,6 @@ sub payment_info {
'save_unchecked' => $conf->exists('selfservice-save_unchecked'),
- 'credit_card_surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage')),
};
}
@@ -929,6 +928,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 5d35fc2..bc98b88 100644
--- a/FS/FS/cust_main/Billing_Realtime.pm
+++ b/FS/FS/cust_main/Billing_Realtime.pm
@@ -353,8 +353,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
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi
index 64fbe8a..4fa3df7 100644
--- a/httemplate/misc/payment.cgi
+++ b/httemplate/misc/payment.cgi
@@ -19,7 +19,7 @@
'num_payments' => scalar($cust_main->cust_pay),
'surcharge_percentage' =>
( $payby eq 'CARD'
- ? scalar($conf->config('credit-card-surcharge-percentage'))
+ ? scalar($conf->config('credit-card-surcharge-percentage', $cust_main->agentnum))
: 0
),
&>
-----------------------------------------------------------------------
Summary of changes:
FS/FS/ClientAPI/MasonComponent.pm | 2 +-
FS/FS/ClientAPI/MyAccount.pm | 3 ++-
FS/FS/cust_main/Billing_Realtime.pm | 4 ++--
httemplate/misc/payment.cgi | 2 +-
4 files changed, 6 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list