paytm / paytm-blink-checkout-react

7 stars 12 forks source link

Checkout page is not closing after we set redirect to false in config file #34

Open prasannakulal1 opened 8 months ago

prasannakulal1 commented 8 months ago

I have this function in config file-

I have set the redirect to false in config. I dont want to redirect to callback url. I want to navigate to particular route.

transactionStatus: function (data) { console.log('payment status==>', data); setShowCheckout(false) }

But how can i close the checkout page once the payment is done.

And iam conditionally displaying checkout page:

{showCheckout && }

Any solution for closing the checkout page after payment done. Because i need to route to next page on successfull payment.

prasannakulal1 commented 8 months ago

Hey i got the solution . we can use window.Paytm.CheckoutJS.close() to close the checkout page.