#TLShadow

1 messages ยท Page 1 of 1 (latest)

modest runeBOT
pseudo finch
#

๐Ÿ‘‹ happy to help

late forum
#

hey there ๐Ÿ™‚

pseudo finch
#

have you had a look at Payment Intents?

#

or SetupIntents

late forum
#

yes the thing is i have seen the woocommerce stripe plugin uses stripe elements to display a form and create a source id which then can be passed with the order information to compelte the intent

#

though i havent found documentation showing that you can use elements without a client_secret or key

pseudo finch
#

If you're just wanting to save a Payment Method details for a customer without making a payment, Setup Intents are the way to go

#

this is the recommended way of using Stripe

late forum
#

ok though the plugin uses /v1/ soruces to create a source and pass that with the intent which is basically what we want

pseudo finch
#

we have many legacy integrations that we try to recommend new users not to use

#

this is one of them

late forum
#

ok i'm reading into the setup intents .. though it does seem to be pretty similiar to payment intent .. and i see no way to credit card information before hand

pseudo finch
#

and i see no way to credit card information before hand
I don't follow

late forum
#

ok lets do a little example .. we do have a checkout page .. contains billing etc and also the card information

#

we now want to send the card information to stripe and get a reference to say yeah thats the method we want to use ... and then send the order with refrence and all the rest to our backend to properly create the intent

#

which at least in my understanding is what sources does

pseudo finch
#

If there's payment involve

#

let's go back a second

#

let's put aside the implementation details

#

could you please elaborate on your use case?

late forum
#

ok we have the following setup, we provide a woocommerce plugin for handling orderstate a backend which acts as statistic and control center and passes information to stripe (to protected the private key) ... and currently we use checkout session, which redirects the final customer from the shop to a checkout page and back if successfull

#

the case is now we want to realize payment completly inside the shop .. without sending any sensitive financial data to our backend.

#

somewhat like stripe does with their plugin

pseudo finch
#

then you can implement using PaymentIntents

late forum
#

which would still redirect the user

#

or lets put it this way i made a test implementation using intents and elements

#

which works .. though you have to do the normal order stuff .. the confirmation and then collect the card information data which breaks the normal experience

pseudo finch
#

what is the normal experience?

late forum
#

ie payment intents happens after the order is confirmed, we want to collect the payment information along side with the confirmation .. so that when you use the pay now button no further interaction is required

#

the normal flow would be you have one page with payment, billing, shipping address .. and submit it at once ... and then you are done.

#

as far as i read into the code the stripe woocommerce plugin does this by .. creating a source (depracted as i understood) and pass the resulting id along with all the other information and create an intent with that source id

#

don't get me wrong i have no problem using setup Intents if there is a way to send CC,CVC and all the other stuff and get back a setup intent id and the nfill in tax,shipping etc would be fine .. though i didn't find that option in the first look through intent

#

or maybe its easier if formulated that way .. we want to pass the sensitive payment information to stripe and get back something we can use to reference that stored data and complete the payment without redirecting or any whitelabel pages

pseudo finch
pseudo finch
#

you just need to pass the client_secret for the Elements and it will automatically create the Payment Method and attach it to the Payment Intent

#

and if the Payment Intent is already confirmed then it would be successfully paid

late forum
#

yeah .. and to get a client_secret i need to create a paymentIntent .. and creating a paymentIntent each time someone visits the checkout sounds a bit problematic

#

though i see when setting up the sample it worked fine, problem is a bit woocommerce

pseudo finch
#

there's no problem with creating Payment Intents or even reusing them

late forum
#

ok lemme describe the flow we ahve to use this maybe depicts the problem better:

we have a confirmation page with the items, billing, payment information. At this point there is no real order (no reference number, no total price etc, and user still has to confirm including agbs and stuff) ... so usally once that is done you can create the intent normally and all goes fine

#

problem at this stage is .. when we collect payment information at this point .. we would have to send it through the backend server, which is a no go option

#

thats why we are looking for a way to kinda create the payment with stripe and then pass a reference on which would circument the no go

#

or we would have to create the intent already there but that would mean for every possible checkout there would be an order, which will be confusign for the store owner since the user hasn't confirmed his intentions yet

pseudo finch
#

you can use Setup Intents to collect the Payment Method and use that to create/confirm the Payment Intent in the backend and passing the Payment Method Id

late forum
#

ah .. okay just as recap .. i kinda make skeleton setupIntent .. then i can use that to use elements to collect the payment information and further on once the order is placed i can add all the missing stuff (shipping,discount,items,total) and complete it by then ?

pseudo finch
#

you have 2 options

#

1st option create a Setup Intent collect the Payment Method and once the order is ready, you create a PaymentIntent that you can confirm on the server side

#

the only problem with this is that in some cases with SCA you might be asked to ask the customer to authenticate 3DS 2 times, once on Setup and once on Payment

#

the other option is the two-step-confirmation which is a beta feature, with this you no longer need Setup Intents

#

please read through the docs to see whether this is appropriate for your use-case

late forum
#

hmm okay will do thanks

#

ok and the sources approach is totally discoruaged or could it be an option albeit not a wanted one ?

pseudo finch
#

I'm here to answer any of your questions

#

would you mind me asking where is your Account located?

late forum
#

germany

#

that's one of the reasons the whole who gets which data is so important :/

pseudo finch
#

since you are in the EU SCA is a big thing to handle which is not supported by sources

#

so I really think you should consider one of the two options we've discussed earlier

late forum
#

oh okay thats a real strong point :/ thanks

pseudo finch
#

let me know if you need any more help