#hendr1x

1 messages ยท Page 1 of 1 (latest)

echo coveBOT
stone widget
#

๐Ÿ‘‹ happy to help

#

I'm not sure I follow, would you mind elaborating?

rustic brook
#

So normal flow of checkout is collect address data, shipping, payment, confirm. Sometimes they might go back to payment step

#

How do I handle that?

#

I should not show the form like the first time right?

stone widget
#

Do you mean by using Checkout, Stripe's product? or you're creating your own Checkout Custom flow?

rustic brook
#

Custom I guess

#

I'm using elements

#

paymentIntent -> confirmIntent

stone widget
#

in that case, leave the payment to the last step

#

once a PI is confirmed you can't change anything

rustic brook
#

I want to provide a confirm step

#

Can I delete and then setup a new one?

stone widget
rustic brook
#

I would rather the validations run instantly

stone widget
rustic brook
#

Ok. So I have to recode everything huh?

#

No more payment Intent?

stone widget
#

how did you get to that conclusion?

rustic brook
#

Your example code is only showing node so its hard for me to understand what is going on.

#

first I need to create a payment method.

#

Does this do a redirect under any situtation?

stone widget
#

you can change the coding language

#

what do you use?

rustic brook
#

Its nbd...I'm just not used to it

#

you only have node available for the confirmation page

#

I'm using php + vanilla js

stone widget
#

Hmmmmm you mean for step 6?

rustic brook
#

5

stone widget
#

step 5 is only front-end

#

vanilla javascript

rustic brook
#

nbd

#

I got it

#

first I need to create a payment method.
Does this do a redirect under any situtation?

stone widget
#

you can use Setup Intents in that case if you want

rustic brook
#

I just want the simpliest approach

stone widget
#

there are several ways to achieve the same thing

#

it really depends on what you want, and think is the simplest

rustic brook
#

I just spent all yesterday coding a dynamically saving billing address form because confirmPayment forced a redirect and I was told any delay in sending that request could result in errors. I would LOVE to get rid of that. Does payment method or setup intents get rid of that. Essentially do any of these NOT require a redirect when collecting the payment information?

#

The other requirement is to be able to have a confirm page and the ability to go back and edit or delete existing payment collected information if needed

hybrid nebula
#

hello

#

help my

#

i want contact support

paper ivy
#

@hybrid nebula please do not jump into someone else's thread unless you're contributing to their concern/problem.

hybrid nebula
#

okay sorry

rustic brook
#

@stone widget ?

paper ivy
#

Hi ๐Ÿ‘‹ I'm jumping in as my teammate needed to step away. Whether a redirect is required when collecting payment method details is dependent on the type of payment methods that you plan to accept.

rustic brook
#

under every available option?

#

sorry for being unclear

#

for every payment collection method you offer?

#

Did you see my post above about having to save a bunch of address data via ajax while they enter it because of your redirect requirement?

#

I would love to remove that complexity

#

but i need to have the payment form and billing address info on the same page during checkout

paper ivy
#

I've reviewed the thread's history, but don't think I see the context that you're referring to.

Yes, if a type of payment method that is being used requires a redirect to occur to complete it's authentication process, then all of our approaches will use that redirect.

rustic brook
#

is it possible to delay the authentication process until the confirmation page?

#

That is what I meant...its just a few minutes ago

paper ivy
#

No, the authentications occur when you confirm the Payment Intent/Setup Intent.

rustic brook
#

I was just shown a new approach...createPaymentMethod. Does this do a redirect when it runs?

#

it looks like I can use that method to delay confirmPayment until later

paper ivy
#

I'm not sure offhand.

rustic brook
#

so I need to submit a ticket or something?

#

This is going to require a complete recode on my end and I don't want to do that unless I know it will work

paper ivy
#

Um, maybe, it'd probably be faster to build a POC and test if it behaves the way you want it to though. (That's what I was planning to do if I got a break between answering questions)

rustic brook
#

it looks promising because there is no return_url parameter

#

However these is this rather vague "caution" on the docs : A created PaymentMethod must be immediately used to confirm a PaymentIntent or SetupIntent and attached to a Customer if intended for future use.

#

I have no idea really what that means...how long is immediately?

paper ivy
#

I'm not sure, that's a pretty new document, but I don't think it necessarily means immediate. Are you encountering errors in your test flow that indicate you're waiting too long?

rustic brook
#

no...I just got introduced to the payment element

#

I guess I'm gonna just build it and see

#

If tarzan comes back maybe you could ask him to look at this thread? He is the one that introduced it to me

#

@stone widget

echo coveBOT
sour laurel
#

Hello ๐Ÿ‘‹
Taking over, let us know if you had a chance to test out the above and have a follow up

rustic brook
#

I just got back to computer

#

I'm going to start implementing now

sour laurel
#

๐Ÿ‘

rustic brook
#

You don't know the answer to that question difinitively do you? If payment method function requires redirect during any situations?

sour laurel
#

which function exactly are you referring to? (its a long thread so there's ton of context ๐Ÿ˜… might take me a while to read up)

rustic brook
#

createPaymentMethod()

#

If I can just summarize what I want.

#

I want to have a "payment" step on a custom checkout flow that has the payment form (elements) along with address data. The redirect that confirmPayment has (what I coded before) requires me to save the address via ajax which I don't like. So I want a solution to collect payment details that doesn't require redirect. I also need the way to modify payment (either update or delete/create) after it has been provided. Lastly I need a confirm page during my checkout flow.

sour laurel
#

So basically what you want is to create a PaymentMethod before you proceed with intent confirmation?

rustic brook
#

I just learned about paymentmethod. I think what you said is correct however

sour laurel
rustic brook
#

As I said, I just want to be sure that createPaymentMethod never requires a redirect

sour laurel
#

I am 99% sure createPaymentMethod would not require a redirect, it would be easier to just test this out tbh. That way you can be certain of the expected behaviour

rustic brook
#

Ok. I'm coding it up now...was just hoping to spare the work but nbd. Thanks for your help