[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
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user