#guizhong_10139

1 messages · Page 1 of 1 (latest)

dapper tideBOT
kind ridge
#

Hi

here does not carry available parameters
What you mean exactly by this ? could you please share more details ?

untold osprey
#

But after I click, the callback address of the jump does not have this parameter, but there is this parameter in the original window

kind ridge
#

Can you share the code you are using for confirming the payment intent ?

untold osprey
#

/payment/stripestatus?payment_intent=pi_3NhqGBDZuQbHB0QK0uQj7Fz8&payment_intent_client_secret=pi_3NhqGBDZuQbHB0QK0uQj7Fz8_secret_t8WNNiuQmbdmb6sZHct8m9Cju Normally it should return like this

#

Newly opened windows will simply return
'/payment/stripestatus'

kind ridge
#

What was the status of the Payment Intent after the test ?

untold osprey
# kind ridge What was the status of the Payment Intent after the test ?

After the test, two windows will be generated in the browser, one is the original pop-up window, and the other is a newly generated test window to confirm whether the payment is successful. The original pop-up box can return the link parameters normally, but the newly generated test window to confirm whether the payment is successful will not return the link with the parameters

kind ridge
#

OK the issue is that you are doing a redirection by your own also

#

window.location.href

#

you else block, is valid also when the payment status is suscceeded

#

You should remove the else block

#

and add the payment_intent and status in the return_url of the confirmPayment function

untold osprey
#

But how should I get payment_intent and status in the confirmPayment method

#

The res.paymentIntent.id parameter I used was obtained after the confirmPayment() method was executed

kind ridge
#

on the redirection, you read the query params and make an API call to fetch the PaymentIntent status

untold osprey
#

I used the two parameters in the picture, but they are both the return value of confirmPayment()

#

Other redirected payment methods will automatically carry the correct parameters, only WeChat Pay does not, I have tested other payment methods

kind ridge
#

Did you tried payment method that requires redirection like wechat ?

#

in the code you are sharing in some cases, you'll have two redirections in place.

#

return_url of the confirmPayment and the window.location.href of your code

#

First keep only return_url one and do again the test.

untold osprey
mystic pulsar
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

untold osprey
#

OK OK

mystic pulsar
#

So, when you get redirected back after using WeChat Pay, you don't get the query parameters, correct?

#

Let me test this.

untold osprey
#

yes

mystic pulsar
#

I have just tested and I am getting the redirect parameters.

#

Could you please share the PaymentIntent ID pi_xxx?

untold osprey
#

"pi_3Nhqi2DZuQbHB0QK0sgTqZ14"

#

can you get it Is there an example that I can refer to

#

Now Alipay redirected return_url can be obtained, but WeChat payment cannot

mystic pulsar
#

I see your API version is not so fresh: 2020-08-27

#

Could you try sending a request with a newer version?

#

I will also try using an old version.

untold osprey
#

Is this the front-end version or the back-end version?

mystic pulsar
#

That's Stripe API version, so you will need to use a 'Stripe-Version': '...', header for both calls.

#

No, sorry, I tried using your version and I am still getting the query parameters. You can disregard that idea.

mystic pulsar
#

And see what happens

untold osprey
#

ok

#

Does this api version need to be upgraded in the management account? This administrative account is not with me

#

It still doesn't work, return_url: '/payment/stripestatus' has no parameters

mystic pulsar
untold osprey
#

I removed redirect: 'if_required' to try to redirect

mystic pulsar
#

And it didn't help?
Are you redirecting the customer after they hit /payment/stripestatus?

#

Maybe you have a site to replicate this? It doesn't sound right. Maybe you could use ngrok.io to allow me to test it for myself: https://ngrok.com/

untold osprey
#

This website has both Alipay and WeChat, Alipay is normal

mystic pulsar
#

I can't access it, unfortunately, as I am based in Europe.

untold osprey
#

Also accessible in Europe

mystic pulsar
#

So there's something else happening in the background.

untold osprey
#

Yes, there is no parameter in the newly opened window using WeChat payment, have you seen it?

mystic pulsar
#

I tried again, this is the URL I get before being redirected ☝️

#

This means /hk/payment/stripestatus path in your backend is doing some redirection.

untold osprey
#

The original payment window of WeChat payment has parameters. The problem now is that the window I want him to redirect also has parameters, but in fact he does not have them.

mystic pulsar
#

It won't be the case in Live mode, because there will be only one tab.

#

The second tab is only there to help you out in Test mode

untold osprey
#

ok, that is, in the official environment, there will be no redirection of WeChat payment, but a QR code for users to pay

#

Hahaha, after working for so long, I found that the official environment will not appear, thank you

mystic pulsar
#

Happy to help!