From 2777fd4332dc010afee4e9bf9b1fbcff527e6e5f Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 19 Mar 2018 18:29:01 +0530 Subject: [PATCH] [fix] validate minimum transaction amount in Payment Request for selected payment gateway (#13328) --- erpnext/accounts/doctype/payment_request/payment_request.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 21ddb10b4d..ee20a43d8d 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -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"),