[FIX] payment_stripe: If exception occurs display the message

- The code to display the exception message was not working.
This commit is contained in:
Toufik Benjaa
2018-06-25 16:21:17 +02:00
parent 8346461634
commit 542409a1b6
@@ -54,8 +54,8 @@ odoo.define('payment_stripe.stripe', function(require) {
}).done(function(data){
handler.isTokenGenerate = false;
window.location.href = data;
}).fail(function(){
var msg = arguments && arguments[1] && arguments[1].data && arguments[1].data.arguments && arguments[1].data.arguments[0];
}).fail(function(data){
var msg = data && data.data && data.data.message;
var wizard = $(qweb.render('stripe.error', {'msg': msg || _t('Payment error')}));
wizard.appendTo($('body')).modal({'keyboard': true});
});