[fix] validate minimum transaction amount in Payment Request for selected payment gateway (#13328)
This commit is contained in:
parent
3d85951c1f
commit
2777fd4332
@ -78,6 +78,9 @@ class PaymentRequest(Document):
|
||||
controller = get_payment_gateway_controller(self.payment_gateway)
|
||||
controller.validate_transaction_currency(self.currency)
|
||||
|
||||
if hasattr(controller, 'validate_minimum_transaction_amount'):
|
||||
controller.validate_minimum_transaction_amount(self.currency, self.grand_total)
|
||||
|
||||
return controller.get_payment_url(**{
|
||||
"amount": flt(self.grand_total, self.precision("grand_total")),
|
||||
"title": data.company.encode("utf-8"),
|
||||
|
Loading…
Reference in New Issue
Block a user