#yassineh

1 messages · Page 1 of 1 (latest)

rancid mossBOT
swift patio
#

hi, what specific technical question did you have?

shrewd ether
#

i dont know if it is possible to have that kind of customization with paymentElements

#

my current implementation fetches the paymentMethods of the user then i display them manualy in a list and give the user the possibilitiy to pick one and pay, or create a new paymentMethod (with the option to save it, if not saved it gets deleted)

when the user submits the order, a token is created between the custmer and the stripe connected account, then a custmer is created with the token as a custmer of the stripe connected account, then a paymentIntent is created with that new custmer with stripeAccount = to the connected account

the payment intent is returned to the client-side, with it and the cardId the we call the stripe confirmCardPayment

#

based on that, what will still be necessary in the new implementation..?

#

(sorry for the long message)

swift patio
#

that's all possible yep

#

none of that really changes

shrewd ether
#

so what does the paymentElement actually add? the frontend form handling for all supported paymentMethods?

swift patio
#

yep

shrewd ether
#

this makes my life much easier

#

one last question

#

when the user wants to use a saved paymentMethod, does the paymentElement provide a feature to fill the form with a given paymentMethod retrived from a custmer?

swift patio
#

not right now no.

shrewd ether
#

so what the process for this case

swift patio
#

you would build a UI for that and call confirmCardPayment with the pm_xxx ID of a selected card, without even using the PaymentElement

shrewd ether
#

i see

#

thank you again