#slowgen - checkout
1 messages · Page 1 of 1 (latest)
hey there, what do you mean by checkout.js here? This isually refers to a legacy Checkout solution no longer recommended, but you're also using terminology form a mode integration. Can you clarify what you're trying to do?
In that page if you choose custom payment flow there are files such as create.php, checkout.html and checkout.js
Which would be the lastest guide to follow
Oh, you're referring to the sample code, I see
The best flow is up to you! What are you trying to do, exactly?
So just wanting to know why those two cases are there and how to test those
processing and requires_payment_method
Where are you seeing this, exactly?
line 68 checkout.js
So that happens after redirect but I can't get there with those statuses
Oh i understand
So to test this you need to use different test payments methods
For processing, you'd need to use an async payment method that has a processing delay, such as Sepa -- it may not apply to the payment methods you offer
We're just offering cards and Google & Apple pay will it apply to those?
For requires_payment_method you can test this by having your payment fail, for example by using an SCA/3DS test card then failing the authentication step
For cards you can test requires payment method, yes
Use on of these cards then "fail" the authentication step
Sorry to be a pain, so when testing those statuses according to the docs is after redirected to return_url but in my cases it's showing in the same page without redirecting. Does this mean that if I offer card and apple/google pay then it will olny redirect if it succeeds. Cos that''s how it's behaving right now. Any decline/auth failure stays on the same page with message on #payment-message card declined, insufficient funds etc and failing 3ds gave this message without redirecting
We are unable to authenticate your payment method. Please choose a different payment method and try again.
Have you enabled any other options? Such as only redirecting if_required?
The default is for authentication to involve a redirect, but this is optional for eg cards, and you can opt out of that redirect
Can you share your call to confirmPayment?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Just a part of it
And using the 3ds test cards you're not redirected to an authentication page? Does an authentication challenge appear in a model?
Yes it does
I mean modal shows but no redirection
I've never been able to redirect there unless it was success, so really I wanted to know if it'll ever get there. So I can handle that case. We're only offering card and apple/google
Sorry, redirect to where? I thought you weren't seeing a redirect?
You should see this flow as a redirect by default, but also you may set redirect=always in the confirm parameters:
https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect
No I'd rather not redirect unless it was successful. Sorry if I lost you. Currently never redirects unless success. But in docs it mentions testing for processing and requires_payment_method. And those two to be tested only after redirection (but I can't redirect unless success). Will those two apply to my situation
E.g. does apple/google pay complete sync?
Those will be synchronous as far as i know, yes
You can also modify the code to manually retrieve the payment intent to enter that flow
You don't need to keep the sample code as it is, you in fact should be using it only as a reference to see how certain tasks can be accomplished in your application
Yes understand and helpful. Most of my code is server side but that was a bit baffling why to test those two situations if I could never reach it with those statuses
Consider it illustrative of other payment flows -- your particular integration may not need it
Cheers highly appreciate your help as always
NP!