I am using the Mastercard Payment Gateway API for Hosted Session: Mastercard Payment Gateway API Documentation
The integration works as expected on the first load but this has been written into a single page app. When the user goes back a page via the breadcrumbs (using javascript hash to load 'pages'). When the user then returns to the payment 'page' the Mastercard payment api should then be triggered a second time, this does not happen.
The documentation doesn't say if PaymentSession.configure({})
can be sent more than once but I am assuming that is my issue.
I have tried to 'reset' the PaymentSession
and reload the session.js
javascript but so far have not been able to get this particular case working. I was wondering if there is a way to 'reset' the configure()
or if there was another way to approach this?
I would rather not copy and paste my code in as it's a payment integration although it's pretty much line for line the same as the example on the documentation. I would also say that the issue is unrelated my personal code and more towards how Mastercard's Payment API works and the fact that my website is a single page rather than only loading session.js when needed.