check in approve order endpoint whether card is disabled and return error message accordingly.

This commit is contained in:
David Remer 2020-09-18 11:55:25 +03:00
parent 1dc9a05452
commit c748c145db
4 changed files with 28 additions and 6 deletions

View file

@ -10,7 +10,11 @@ const onApprove = (context, errorHandler) => {
return res.json();
}).then((data)=>{
if (!data.success) {
errorHandler.genericError();
if (data.data.code === 100) {
errorHandler.message(data.data.message);
} else {
errorHandler.genericError();
}
console.error(data);
if (typeof actions.restart !== 'undefined') {
return actions.restart();