summaryrefslogtreecommitdiff
path: root/addons/payment_stripe
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2021-01-11 18:04:03 +0000
committerGoffin Simon <sig@odoo.com>2021-01-12 08:58:43 +0000
commit9e9db5d0e9af81da8f89b38a5dc8c01fe3052252 (patch)
tree34dd5d339a0c300ff8d0c4b5a42ec49ec4c92d04 /addons/payment_stripe
parent5e9e35ef0d7b0cdecc5c25dc4db04925ed0408a6 (diff)
[FIX] payment_stripe: Bancontact with mobile
Steps to reproduce the bug: - Let's make a bancontact payment with Stripe on mobile from the web shop - Stripe redirects you to Odoo - Your phone asks on which browser you wanted to redirected to Odoo - Choose one Bug: An internal error was raised. When you clicked on a browser (the same you were using or a new one, whatever) Odoo will resend a request to Stripe. But this request will have wrong data in it. Stripe will answer with: Stripe: entering form_feedback with post data {'error': {'code': 'resource_missing', 'doc_url': 'https://stripe.com/docs/error-codes/resource-missing', 'message': "No such payment_intent: 'py_1I6c4UKhH8RhRq18TJs2CP0z'", 'param': 'intent', 'type': 'invalid_request_error'}, 'reference': 'S00002-1'} opw:2422031 closes odoo/odoo#64378 X-original-commit: a42075c9f913f4a20b28f97f0f6786f5a7b2968a Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons/payment_stripe')
-rw-r--r--addons/payment_stripe/models/payment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/payment_stripe/models/payment.py b/addons/payment_stripe/models/payment.py
index 41dd09ba8a4..53ac5f5682a 100644
--- a/addons/payment_stripe/models/payment.py
+++ b/addons/payment_stripe/models/payment.py
@@ -441,7 +441,7 @@ class PaymentTransactionStripe(models.Model):
invalid_parameters = []
if data.get('amount') != int(self.amount if self.currency_id.name in INT_CURRENCIES else float_round(self.amount * 100, 2)):
invalid_parameters.append(('Amount', data.get('amount'), self.amount * 100))
- if data.get('currency').upper() != self.currency_id.name:
+ if data.get('currency') and data.get('currency').upper() != self.currency_id.name:
invalid_parameters.append(('Currency', data.get('currency'), self.currency_id.name))
if data.get('payment_intent') and data.get('payment_intent') != self.stripe_payment_intent:
invalid_parameters.append(('Payment Intent', data.get('payment_intent'), self.stripe_payment_intent))