diff --git a/addons/payment_stripe/static/src/js/stripe.js b/addons/payment_stripe/static/src/js/stripe.js index 0283fd453d8..8de9bc62c4a 100644 --- a/addons/payment_stripe/static/src/js/stripe.js +++ b/addons/payment_stripe/static/src/js/stripe.js @@ -27,7 +27,7 @@ odoo.define('payment_stripe.stripe', function(require) { if (stripeHandler) { return stripeHandler; } - stripeHandler = StripeCheckout.configure({ + var handler = stripeHandler = StripeCheckout.configure({ key: $("input[name='stripe_key']").val(), image: $("input[name='stripe_image']").val(), locale: 'auto', @@ -65,7 +65,7 @@ odoo.define('payment_stripe.stripe', function(require) { }); }, }); - return stripeHandler; + return handler; } require('web.dom_ready');