#bumbzor_api
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!
🔗 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/1212757443122036736
📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.
⏲️ 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. Thank you for your patience!
I can show you a live example if you want to.
Hi there.
I don't have a live account so I don't see how the process is for live but a user told me it's the same. In the device he scanned and paid for it also tried to open the same "confirmation page". I can give you a link where you can test this
Hello
Hey!
can I give you a link to test this? might make it easier to understand what I am saying 😄
Yep that would be helpful
Ok so go here: edd-pro.rmjsoft.com/checkout/?edd_action=add_to_cart&download_id=248 put in any random email/nam, Select the Credit Card option and then cash app. When you get the QR code scan it via the camera on the phone and then approve it. Notice how on your mobile browser it shows you the confirmation page that also opens in your computer browser (where you scanned the qr from). Since it's an ecommerce flow and on your mobile the purchase was not "created on" you will see a Sorry, cant retreive purchase session.
My question is, how to avoid that page opening on the device you pay from, on your phone browser in this case? as it can confuse the user since it says it's an error to show receipt
Are you using redirect: if_required in confirmPayment()?
Hmm actually yeah I think this is just expected behavior for the device that you pay with. That said, there should be URL params here that you can use to show the correct confirmation page regardless of device.
the problem is the session originated on the website in browser1 and the confirmation/receipt page, is attempting to retrieve the data stored in the session in the browser but since it's a different browser it can't. Can it not show that page in the browser2(mobile device) and maybe just show a simple confirmation message from Stripe or something like that?
No we don't handle showing any confirmation messages for you. That is your responsibility. You will need a different code path here for mobile if that is what you want.
The redirect should happen but only in the original browser window.
Like what you should do in this case is look if you don't have a Session stored then you look at the URL Params and use that for the simple confirmation page.
We can't not have a redirect occur on the mobile device too... like I said it doesn't make sense to leave the customer in the CashApp flow after completing payment.
is this exactly how it happens wit ha real payment? I see that it should open the cashapp app for a real one, but after that it still redirects?
understood. so there should be a different redirect here somehow. any paramters in particular we can look at?
It should return the customer to the return_url, yes.
which it does but it does it in 2 places yeah.
Can you test for me real quick, if you do set redirect: if_required in confirmPayment() does the mobile device still redirect?
let me chec
That actually might prevent that... I don't recall as I haven't tested this flow in a minute
from what I can tell it's set like that already
confirmParams: {
return_url: edd_stripe_vars.successPageUri,
},
redirect: 'if_required',
Hmm but your web page (non-mobile) still redirects?
Yes that one loads fine and shows the Receipt page corretly with all the order details since that is where the session exists.
Yeah but are you redirecting on that page yourself?
Otherwise that redirect definitely should not happen if you have if_required set
it's automatic when payment is done in Stripe
we are redirecting to that URL when the intent is confirmed.
Yeah that's what I'm saying though... if you have redirect: 'if_required', then on the web page that shows the QR code it should not automatically redirect.
Stripe redirects to the return_url when payment is complete. If you don’t want to redirect after payment on web, pass redirect: if_required to the Payment Element.
So the only reason it would redirect in that case is if you explicitly are telling it to redirect after the promise resolves
if ( ( 'succeeded' === intent.status ) ) {
window.location.replace( edd_stripe_vars.successPageUri );
} else {
Yep okay so you are redirecting yourself, thanks.
Alright so at your return_url you should see a payment_intent parameter for the mobile browser.
That is the PaymentIntent ID
yeah and also a pi_client_secret
You can then use that to retrieve the PaymentIntent using https://docs.stripe.com/js/payment_intents/retrieve_payment_intent and show a basic confirmation page on the mobile device
Sorry, I actually did mean the client_secret, as that is what you need for that method I linked.
The other thing you could do here is just redirect them to a static page.
Which is just a generic "Good job you paid, please look at your web browser".
But up to you. The main thing is you can't prevent the mobile device from redirecting here.
right. and the same happens in live mode as well after paying via cashapp?
Yes
In livemode they are sent to the cashapp app and then redirected back to the return URL
got it thanks.