#pankaj-sonava_best-practices

1 messages · Page 1 of 1 (latest)

wintry moonBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1465782822164762665

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

native steeple
#

Some Broken Examples:

  • WeChat Pay: QR modal → “simulate QR” opens another webview → authorize → success, but no return to Checkout / no success_url redirect.
  • Alipay: authorize screen → success, but no return to Checkout / no success_url redirect.

Questions:

  1. Will this behave differently in live mode vs test mode?
safe torrent
#

Hi there,
looking into this, give me just one sec.

#

Are you defining a return_url or only a success_url for your checkout session?

craggy falcon
#

We're setting both the success_url and cancel_url when creating the checkout session, but not setting the return_url.

safe torrent
#

Ok, can you try to set the return_url which is needed for Payment MEthods with their own app/modal/page for confirmation

craggy falcon
#

@safe torrent Accirding to the docs, return_url only applied to ui_mode: embedded or ui_mode: custom. We're using ui_mode: hosted. Does is still make sense to set the return_url?

safe torrent
#

It's required for ui_mode: embedded or ui_mode: custom but it should also work for hosted

craggy falcon
#

In that case, is it okay to set the return_url to the same value as success_url? what behavior should we expect when we test this change?

safe torrent
#

I just tested Cash App on my end with only success_url set, and it works. So there is no need for the return_url for Cash App. Do you have an example where Cash App did not redirect correctly?

craggy falcon
#

@native steeple Can you provide an exmaple with screenshot

native steeple
wintry moonBOT
vast leaf
#

Hello
What are you setting success_url as?
Can you share the Universal Link URL? Also the relevant cs_test_xxx ID

dusky badger
#

To add some more context here is the flow and where we are getting stuck:

  1. Generate a Checkout Session
  2. Mobile app displays the Stripe-hosted checkout page in a webview
  3. User selects WeChat as the payment method
  4. A QR code is presented
  5. QR code simulation is completed
  6. Test payment is successfully authorized
  7. Flow gets stuck and does not redirect back to the original Stripe hosted checkout page
vast leaf
#

Gotcha. Yeah that looks off

vast leaf
#

yeah, I think I was able to reproduce it myself. Let me check with our product team about this.

dusky badger
#

Okay thanks @vast leaf we also would like to understand if this a test mode issue only or if it will be an issue in live mode.

vast leaf
#

It's likely just test mode issue since the flow is different for live mode wechat payment.

dusky badger
#

Is that the same case for all other payment methods e.g. cash app, amazon pay, etc. ?

vast leaf
#

Just tested and it seems to work fine for Cash App

#

So it's likely affecting just wechat

dusky badger
vast leaf
#

Yeah this hook page eventually redirects to the universal link

dusky badger
#

What universal link? Just like for CashApp we expected to eventually redirect to our success_url.

vast leaf
#

Ah I meant your URL (I assumed that URL is a Universal Link that redirects to your app)

dusky badger
#

Yes that is correct. After more testing it seems that WeChat is the main payment method that is not working because after test payment is authorized it does not redirect to our Universal Link (just stays in WeChat authorization page)

vast leaf
#

Correct. I checked with the Product team and it seems to be just a test mode quirk and shouldn't affect live mode

#

They're looking at the test mode redirect behavior but I don't know if we'd have any immediate solution for this

dusky badger
#

Sounds good, thank you for clarifying @vast leaf . We’ll move forward with a production build of the app so we can verify this behavior in live mode. For test mode, we’ll look into a workaround to bypass this issue with WeChat.