Search code examples
javascriptphpjquerycodeigniterrazorpay

Razor pay payment integration -> How can i detect razor pay model close by close button X


i am using Razorpay in CI framework when user close without payment create razor pay model then for cancel order i want a query fire by status changed as cancelled.

So how can i detect this. I am already using by click jQuery click on close function but not working...


Solution

  • Razorpay provides JS method to detect modal close. Any JS code you write on your side wouldn't work on the checkout page since its a sandboxed iFrame. Find the documentation link here: https://docs.razorpay.com/docs/checkout-form#checkout-modal-lifecycle