admin管理员组文章数量:1405170
I am integrating Snap Midtrans into my application, using Laravel as the backend and React as the frontend. The application follows a single-page app (SPA) concept, meaning page transitions are handled by react-router/react-router-dom without reloading, refreshing, or redirecting the web page.
Currently, I am adding the Snap feature to the application, but I am facing difficulties because every time a user completes the payment method selection, Snap redirects the application to the URL specified in the Midtrans Dashboard. This redirection disrupts my application's state. However, I have already used JS callbacks, specifically the onPending
option. As stated in the documentation:
If Merchant use snap.js JS callbacks (onPending, onSuccess, onError), those JS callbacks will be triggered instead of redirection.
I have tried removing the Finish URL from the dashboard and overriding the Finish URL through the backend, but Snap still redirects (this time to the application's main frontend page). I have also checked the documentation, but there seems to be no option to disable the redirection to the Finish URL.
I would appreciate any guidance. Thank you.
本文标签: javascriptmidtrans payment gateway stop default redirectStack Overflow
版权声明:本文标题:javascript - midtrans payment gateway stop default redirect - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744294106a2599257.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论