#legecha_code
1 messages · Page 1 of 1 (latest)
👋 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/1338820201982070805
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
- Where do you see the error exactly? Could you please share the screenshot?
- Could you please elaborate on your "one page checkout" requirement? Maybe there's easier ways to implement it.
Hi vanya, thanks so much for your support!
- The error is returned from the call to
stripe.handleNextAction(..)- so above, where it saysif (error) { handleError(error); } ...it uses the suggest handleError method on that documentation page (https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web&type=payment) - ends up showing on the page
Hmm, this doesn't look right. Do you see any errors in the console?
- Basically our requirement is to have it so there isn't multiple navigation steps for the ordering process - attached is a screenshow of the checkout when loaded.
So they will enter their address details, select their payment option and then finally click the "Submit Order Now" button. One of the issues we had was knowing whether to create the order our side first or attempt to process the payment first - if the payment failed then the customer could potentially go and change their address details, add more products, etc - we thought it would be best that we don't create the order and related models until we knew they were definitely finished (i.e. payment successful)
So with that in mind, we didn't want the automatic redirect to a success page - our web site is also Laravel/Livewire based so all the validation and processing of the order is done as part of the component.
The flow I settled on looks something like the following:
- When a customer clicks "Submit Order Now", perform validation on the checkout form data (name, address, etc), if successful move to step 2
- Call Stripe's elements.submit() followed by Stripe's stripe.createConfirmationToken(), if both successful move to step 3
- Call Stripe's $stripe->paymentIntents->create(...) passing in the confirmation_token, if successful move to step 4
4a) If returned payment intent has a status ofrequires_action, call Stripe's stripe.handleNextAction(), if successful move to step 5
4b) If return payment intent doesn't have a status ofrequires_action, move to step 5 - Use the returned payment intent to create the order in our system and link to the stripe payment
No - I do have a failed to load resource/401 for the api.hpcaptcha.com request - I read this was due to test domains setup and I did add my dev domain but it still happens right now - not looked into it a whole lot.
I also do get this:
[Warning] [Stripe.js] (controller-08c8f0eb9a782bedecc4b7eab3af9e65.js, line 1)
"The following payment method types are not activated:
- paypal
They will be displayed in test mode, but hidden in live mode. Please activate the payment method types in your dashboard (https://dashboard.stripe.com/settings/payment_methods) and ensure your account is enabled for any preview features that you are trying to use."
Not sure if that could be related - but I do have PayPal enabed (in Test mode) in Settings > Payment methods on the dashboard
No, that doesn't seem to be related.
hi! I'm taking over this thread. give me a few minutes to catchup.
Thank you soma!
do you have a link where we can reproduce the issue?
I'm more than happy to let you view our development area (this isn't currently live) - but it is ip restricted - I can open it up no problem if you have an outgoing IP that is something you're in a position to share?
I can't share my IP here since it's a public forum. also this question seems to require some deeper investigation. so I would recommend to create a support ticket directly with our team (see message below).
Hello @snow junco, we have sent you a direct message, please check it at https://discord.com/channels/@me/1338833423242100787
- 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
good point - do I need to reference this chat here on the ticket?