From 9c79a515ca3438e39570df90f27b052a89ef7d8b Mon Sep 17 00:00:00 2001 From: houssine Date: Wed, 10 Jan 2018 19:21:42 +0100 Subject: [PATCH] [IMP] do not auto validate the subscription when the payment type is deferred --- easy_my_coop_online_payment/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy_my_coop_online_payment/controllers/main.py b/easy_my_coop_online_payment/controllers/main.py index 1f4db2d..819e6f6 100644 --- a/easy_my_coop_online_payment/controllers/main.py +++ b/easy_my_coop_online_payment/controllers/main.py @@ -23,8 +23,8 @@ class SubscriptionOnlinePayment(WebsiteSubscription): def get_subscription_response(self, values, kwargs): subscription = values.get('subscription_id', False) - invoice = subscription.validate_subscription_request()[0] if kwargs.get('payment_type') == 'online': + invoice = subscription.validate_subscription_request()[0] acquirer = request.env['payment.acquirer'].search([('website_published', '=', True)])[0] return website_payment().pay(reference=invoice.number, amount=invoice.residual, currency_id=invoice.currency_id.id, acquirer_id=acquirer.id) else: