Closed sanjayrathod141 closed 2 years ago
hi @sanjayrathod141 thanks for reaching out, looks like the issue seems valid, the onFailure
function seems to behave not as expected.
We'll have to check with our internal team to check & fix this. We'll let you know when it solved. Thanks! Note: This seems to be issue on sandbox env only, production env should be fine.
Update for this case,
The issue seems to be identified on scenario:
MidtransNew3ds.getCardToken
JS function, the API will unexpectedly response with 400
HTTP status code. Which will fail to be properly parsed by Browser/JS as AJAX callback.Our team will further investigate on this.
In order to prevent this, there is a workaround. Before passing the card.card_number
input param, the value can be validated first using this implementation for example:
Then, only proceed to call MidtransNew3ds.getCardToken
when the validation result is valid. If the card_number is not valid card, you can proceed to show validation error to the customer/user instead.
Update: confirmed to be issue on our side, and our team is working to fix it. Will inform you for further updates. Thanks.
hi @sanjayrathod141 we'd like to give you update. The issue has been resolved as per today. The onFailure
callback should behave as expected now. You can try again and let us know if you still have any issue. Thanks!
https://user-images.githubusercontent.com/96870831/147807178-e6823b83-a3e6-40c8-87f3-f6ad5bf63481.mp4
Hi,
Not working callback onFailure function. when the user enters the wrong card details then will not call this function. So I can manage to fail cases and not display error msg on screens.
PFA
[
----------------------Code--------------------------------------