Skip to content
Snippets Groups Projects
Commit 97f206e0 authored by Antoine Vandevenne (anv)'s avatar Antoine Vandevenne (anv)
Browse files

[FIX] payment_adyen: unblock the UI when additional details are required


Commit b6ae8a0a introduced the generic behavior of blocking the UI as
soon as a submit button is pressed in a payment form. The 3DS2 flow of
Adyen was not taken into account, resulting in the impossibility to
enter the additional details required by Adyen.

With this commit, the UI is unblocked at the right time to allow the
user to submit the additional details. Moreover, the submit button is
now hidden as soon as we don't want to show it anymore, rather than
after having submitted the additional payment details.

closes odoo/odoo#84695

Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
parent cf61089d
Branches
Tags
No related merge requests found
......@@ -23,7 +23,6 @@ odoo.define('payment_adyen.payment_form', require => {
* @return {Promise}
*/
_dropinOnAdditionalDetails: function (state, dropin) {
this._hideInputs(); // Only the inputs of the inline form should be used
return this._rpc({
route: '/payment/adyen/payment_details',
params: {
......@@ -92,6 +91,8 @@ odoo.define('payment_adyen.payment_form', require => {
});
}).then(paymentResponse => {
if (paymentResponse.action) { // Additional action required from the shopper
this._hideInputs(); // Only the inputs of the inline form should be used
$('body').unblock(); // The page is blocked at this point, unblock it
dropin.handleAction(paymentResponse.action);
} else { // The payment reached a final state, redirect to the status page
window.location = '/payment/status';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment