[FIX] payment_stipe: fix empty card error

before this commit, when try to make payment with
empty card details, it will raise error dialog.

after this commit, error will be append to acquirer
form

task - 2089999

closes odoo/odoo#39729

X-original-commit: 01b143b971a85d6da673df6c536917ad4754b83a
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
This commit is contained in:
Nikunj Ladava
2019-11-04 11:17:13 +00:00
committed by fw-bot
parent ae4855fa1e
commit 9019645a5d
@@ -59,7 +59,7 @@ PaymentForm.include({
return stripe.handleCardSetup(intent_secret, card);
}).then(function(result) {
if (result.error) {
return Promise.reject({"message": {"data": { "message": result.error.message}}});
return Promise.reject({"message": {"data": { "arguments": [result.error.message]}}});
} else {
_.extend(formData, {"payment_method": result.setupIntent.payment_method});
return self._rpc({