Skip to content

Commit 5a56a4a

Browse files
authored
Merge pull request #30 from shoa48/validation-fix
Show errors returned from Moyasar
2 parents 635142a + ee8fb4d commit 5a56a4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Moyasar/Mysr/view/frontend/web/js/view/payment/method-renderer/moyasar_credit_card_method.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ define(
138138
self.isPlaceOrderActionAllowed(true);
139139
globalMessageList.addErrorMessage({ message: mage('Error! Payment failed, please try again later.') });
140140
if (xhr.responseJSON.message) {
141-
globalMessageList.addErrorMessage({ message: xhr.responseJSON.message });
141+
globalMessageList.addErrorMessage({
142+
message: xhr.responseJSON.message + ' : ' + JSON.stringify(xhr.responseJSON.errors)
143+
});
142144
}
143145
});
144146

0 commit comments

Comments
 (0)