#Benoît

1 messages · Page 1 of 1 (latest)

tawdry kernelBOT
primal dock
#

you can get the ID from last_payment_error and pass it back in when confirming again

sage grail
#

Oh great ! Thank you, i check this !

tawdry kernelBOT
sage grail
#

I've got an error when using the pm ID of the last_payment_error

#

"The provided PaymentMethod was previously used with a PaymentIntent without Customer attachment, shared with a connected account without Customer attachment, or was detached from a Customer. It may not be used again. To use a PaymentMethod multiple times, you must attach it to a Customer first."

lyric stream
#

Then the PM mustn't have been attached to a Customer. They're single use in that scenarion. You'll need to re-collect payment info from the customer and re-confirm

sage grail
#

Yes, when i make a 3D Secure payment and fail it, the card is not saved, that's why i asked if i could use the card datas that was used for the failed payment, to avoid asking the customer to re-collect the card datas

lyric stream
#

Then you cannot, no

sage grail
#

Ok

lyric stream
#

It needs to be saved/attached to be used more than once

#

And a payment attempt (followed by a 3DS request) counts as a usage

sage grail
#

Ok,
Could the collected card datas be stored before trying to make the payment ? I could then allow my customer to restart the payment process from his previous card

lyric stream
sage grail
#

I don't understand the difference between this tuto and what i've already done in my app

lyric stream
#

Can you share a pi_xxx where unable to re-use the PM?

sage grail
#

My problem occurs after all this, after i fail the 3D Secure validation.
So in my app, i see that i have an incomplete payment, that i would be able to restart some days later, without having to re-collect the card data. I would like to reuse the card data that have been filled by the customer days ago. As it's a 3D Secure card, it's not saved in Stripe.

Or maybe i missed somthing

sage grail
#

pi_3NQqfxAYYvne95SH2Kdg3cP3

#

And i try to restart this payment by passing the pm ID pm_1NQqg0AYYvne95SH41B0gpYx

lyric stream
#

Ah, ok. I guess we only attach after a successful confirmation

sage grail
#

I see a little difference with my existing code. I don't use automatic_payment_methods: { enabled: true, } when creating my PI, as i don't create it myself, it's created automaticaly with the invoice i create

lyric stream
#

What you want to do seemingly isn't possible. You'll need to provide a new pm_xxx and re-confirm

sage grail
#

Ok

#

Ok i see, i will see to add the Payement Element form again for my customer to be able to restart his payment

#

Should i use then confirmCardPayment() or confirmPayment() ?

lyric stream
#

It depends on the Element you're using to re-collect info

#

confirmPayment is for Payment Element

sage grail
#

I use Payment Element form

#

Ok, thank you