Ezidebit Web Pay Javascript Library

Home » Uncategorized » Ezidebit Web Pay Javascript Library
Uncategorized No Comments

The Ezidebit Javascript library does not have a timeout logic built-in. So it is possible to be waiting for transaction response indefinitely after payment form is submitted to Ezidebit. In this case the callback will never be called. We won’t know if the payment will eventually be processed or not. The only way to find out for certain is to call API to look up the payment by the same payment reference.

This could be an issue because if payment processing took a long time, user may choose to leave the page in which case our system will not receive the payment processing result even if the payment is eventually processed successfully. This will result in payment being debited but no booking in our system!

So since the Ezidebit Javascript itself doesn’t have a timeout logic built-in, we might consider introducing our own timeout (say 1 minute) rather than wait indefinitely. After 1 minute timeout, we will make an API call to check if the payment has been processed using the same payment reference. If payment exists then we will handle the booking according to the payment status (either success or failed). If payment doesn’t exists then we will just display some kind of error to warn user that we cannot determine the outcome of the payment transaction. It is up to the user to try again or simply leave it. (Dale from Ezidebit has confirmed this is a good implementation approach 23/12/2019).