[FIX] payment_stripe: preventDefault
! This is a back-port from 10.0 (fb010a1) !
opw-693017
Original commit message:
When a user uses Strip and clicks on "Pay & Confirm", a "Bad Request"
error can pop-up. This is because it tries to reload the page, while it
should only display the Strip pop-up.
This is simply due to a `preventDefault` done after the event is
performed, and not before.
opw-692341
This commit is contained in:
committed by
Joren Van Onder
parent
0304bf8c59
commit
ab609ec4a5
@@ -46,6 +46,7 @@ odoo.define('payment_stripe.stripe', function(require) {
|
||||
return false;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
ajax.jsonRpc('/shop/payment/transaction/' + acquirer_id, 'call', {}).then(function (data) {
|
||||
$form.html(data);
|
||||
handler.open({
|
||||
@@ -54,7 +55,6 @@ odoo.define('payment_stripe.stripe', function(require) {
|
||||
currency: $("input[name='currency']").val(),
|
||||
amount: $("input[name='amount']").val()*100
|
||||
});
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user