[FIX] payment_adyen: prevent override of the server error by the generic one

Before this commit the generic message error was shown in the payment form
instead of the server error message that did not allow the users to
understand the problem that caused it.

After this commit the server error is shown in the payment form.

closes odoo/odoo#124040

X-original-commit: dc1230648415dbeeb672c6fb9168472ac8c7d651
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Valeriya Chuprina (vchu) <vchu@odoo.com>
This commit is contained in:
Valeriya(vchu)
2023-06-12 14:03:48 +02:00
parent 0a5ee69c51
commit a29971df55
@@ -53,10 +53,12 @@
* @return {undefined}
*/
_dropinOnError: function (error) {
this._displayError(
_t("Incorrect Payment Details"),
_t("Please verify your payment details.")
);
if (!this.$('div[name="o_payment_error"]')) { // Don't replace a specific server error.
this._displayError(
_t("Incorrect Payment Details"),
_t("Please verify your payment details.")
);
}
},
/**