From f5e145d2b9bc79553ea14876679b1677b59a1c0b Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Mon, 10 Sep 2018 17:03:33 +0200 Subject: [PATCH] [FIX] payment_stripe: regex to match so_ID Before this commit, when paying a confirmed SO with the token access with Stripe, Clicking on the button "pay now" wouldn't do anything, because the id of the SO couldn't be retrieved After this commit, the regex that does just that is more generic and the flow works OPW 1881192 closes #26884 --- addons/payment_stripe/static/src/js/stripe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/payment_stripe/static/src/js/stripe.js b/addons/payment_stripe/static/src/js/stripe.js index 4bbc57cfe9d..be767d31161 100644 --- a/addons/payment_stripe/static/src/js/stripe.js +++ b/addons/payment_stripe/static/src/js/stripe.js @@ -93,7 +93,7 @@ odoo.define('payment_stripe.stripe', function(require) { } var access_token = $("input[name='access_token']").val() || $("input[name='token']").val() || ''; - var so_id = $("input[name='return_url']").val().match(/quote\/([0-9]+)/) || undefined; + var so_id = $("input[name='return_url']").val().match(/[quote|order]s?\/([0-9]+)/) || undefined; if (so_id) { so_id = parseInt(so_id[1]); }