Midtrans/midtrans-php

Can snap token re-used to open payment page again, if it was closed by customer?

PandhuWibowo opened this issue · 5 comments

Hi guys, I have problem in Credit Card Transaction. The important part is in token page after user / buyer / customer input the CC number etc, the next part is should input the token (OTP), but I want to cancel this moment, and then I want to checkout for the twice, unfortunately the snap does not show anymore. How could I fix it? Please explain this problem guys,

The case :
https://drive.google.com/file/d/1_pDxVEzWzUdU1VJj8ByHj2gh95R2iOsF/view?usp=sharing

I already followed this guide, but still does not work.
Screen Shot 2021-07-08 at 17 22 24

Reference :
https://docs.midtrans.com/en/other/faq/technical?id=can-i-revoke-or-cancel-an-active-snap-token-to-prevent-the-customer-from-proceeding-with-the-transaction

please contact me on pandhu@antikode.com or 081387019695 to reply this issue or ask the details.
thanks in advance.

I think, this is a simple problem that peoples like you can fix it.

Really? I have no idea. I think this condition officially from this package. Can you help me what should I do? Thanks

i think I found the problem, midtrans can receive similar the order_id?

I got feedback, that I have been sent the order_id
Screen Shot 2021-07-09 at 10 25 11

Hi @PandhuWibowo thanks for reaching us!
So if I understand correctly, the question is:

  • How to re-open that same Snap payment page, if it was closed by user?

The answer is:

  1. Store the Snap Token for that order
  2. On Frontend JS, call snap.pay('that-snap-token'); again when your web/app want to re-open that same payment page for that order

We also just added a new section explaining about this use case here:

Let us know if you still have more questions, or if we misunderstood your question, feel free to re-explain (you can also use Bahasa Indonesia if needed).

For better & faster response you can also contact us via email support@midtrans.com
Thank you! 🙂

Many thanks, I have given the random string at the last order id to re-create snap token. The case can be closed.