changes
This commit is contained in:
@@ -347,6 +347,21 @@ class PaymentProvider(models.Model):
|
||||
and payment_method_sudo.support_tokenization
|
||||
),
|
||||
}
|
||||
|
||||
ICP = self.env['ir.config_parameter'].sudo()
|
||||
surcharge_enabled = ICP.get_param(
|
||||
'fusion_poynt.surcharge_enabled', 'False',
|
||||
) == 'True'
|
||||
if surcharge_enabled:
|
||||
inline_form_values['surcharge'] = {
|
||||
'enabled': True,
|
||||
'visa': float(ICP.get_param('fusion_poynt.surcharge_visa_rate', '0') or 0),
|
||||
'mastercard': float(ICP.get_param('fusion_poynt.surcharge_mastercard_rate', '0') or 0),
|
||||
'amex': float(ICP.get_param('fusion_poynt.surcharge_amex_rate', '0') or 0),
|
||||
'debit': float(ICP.get_param('fusion_poynt.surcharge_debit_rate', '0') or 0),
|
||||
'other': float(ICP.get_param('fusion_poynt.surcharge_other_rate', '0') or 0),
|
||||
}
|
||||
|
||||
return json.dumps(inline_form_values)
|
||||
|
||||
# === ACTION METHODS === #
|
||||
|
||||
Reference in New Issue
Block a user