projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
53a8c81
)
agent-virtualize credit card surcharge percentage, RT#72961
author
Ivan Kohler
<ivan@freeside.biz>
Sun, 16 Oct 2016 22:11:56 +0000
(15:11 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Sun, 16 Oct 2016 22:11:56 +0000
(15:11 -0700)
FS/FS/ClientAPI/MasonComponent.pm
patch
|
blob
|
history
FS/FS/ClientAPI/MyAccount.pm
patch
|
blob
|
history
FS/FS/cust_main/Billing_Realtime.pm
patch
|
blob
|
history
httemplate/misc/payment.cgi
patch
|
blob
|
history
diff --git
a/FS/FS/ClientAPI/MasonComponent.pm
b/FS/FS/ClientAPI/MasonComponent.pm
index
493e0c0
..
3a4bfe1
100644
(file)
--- 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),
'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 );
);
@$argsref = ( %args );
diff --git
a/FS/FS/ClientAPI/MyAccount.pm
b/FS/FS/ClientAPI/MyAccount.pm
index
07b1be9
..
7c17ae3
100644
(file)
--- 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'),
'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{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,
};
return { 'error' => '',
%return,
};
diff --git
a/FS/FS/cust_main/Billing_Realtime.pm
b/FS/FS/cust_main/Billing_Realtime.pm
index
2951360
..
cb7299b
100644
(file)
--- a/
FS/FS/cust_main/Billing_Realtime.pm
+++ b/
FS/FS/cust_main/Billing_Realtime.pm
@@
-418,8
+418,8
@@
sub realtime_bop {
my $cc_surcharge = 0;
my $cc_surcharge_pct = 0;
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
&& $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
a3db58f
..
24248eb
100644
(file)
--- a/
httemplate/misc/payment.cgi
+++ b/
httemplate/misc/payment.cgi
@@
-21,7
+21,7
@@
'num_payments' => scalar($cust_main->cust_pay),
'surcharge_percentage' =>
( $payby eq 'CARD'
'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
),
&>
: 0
),
&>