cope with cancel (bug 830422)
This commit is contained in:
Родитель
0de1ff28bf
Коммит
47415cb9fe
|
@ -62,12 +62,14 @@ define('payments', ['capabilities', 'notification'], function(caps, notification
|
||||||
waitForPayment($def, product, webpayJWT, contribStatusURL);
|
waitForPayment($def, product, webpayJWT, contribStatusURL);
|
||||||
};
|
};
|
||||||
request.onerror = function() {
|
request.onerror = function() {
|
||||||
console.log('navigator.mozPay error:', this.error.name);
|
if (this.error.name !== 'cancelled') {
|
||||||
notification({
|
console.log('navigator.mozPay error:', this.error.name);
|
||||||
classes: 'error',
|
notification({
|
||||||
message: gettext('Payment failed. Try again later.'),
|
classes: 'error',
|
||||||
timeout: 5000
|
message: gettext('Payment failed. Try again later.'),
|
||||||
}).then(window.location.reload);
|
timeout: 5000
|
||||||
|
}).then(window.location.reload);
|
||||||
|
}
|
||||||
$def.reject(null, product, 'MKT_CANCELLED');
|
$def.reject(null, product, 'MKT_CANCELLED');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче