#anshulfarkya_86718

1 messages · Page 1 of 1 (latest)

foggy yewBOT
weary nimbus
brazen minnow
weary nimbus
#

That is only for an alternative flow. In the normal flow you don't pass that value, you use the elements parameter instead

brazen minnow
#

I am passing the elements param but the confirmPayment call is getting failed and when I check the reason on dashboard it's saying please pass payment_method and when I am passing payment_method in the same call it's showing success.

weary nimbus
#

That doesn't sound right. Can you share the errored request id req_xxx it shows on Dashboard

brazen minnow
#

YUQgAO2p0jaxxD

weary nimbus
#

It should in the format req_xxx

brazen minnow
#

req_V8NwSLvQkVzSer
this is the right one

weary nimbus
#

It doesn't look like being confirmed by PaymentElement

#

How did you call the method? Could you share the code? Or better an URL here

brazen minnow
weary nimbus
#

You need to have the elements here

brazen minnow
#

Yes, I am passing elements in card

weary nimbus
foggy yewBOT
crisp coyote
# weary nimbus 1. https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_in...

@weary nimbus The reason for using different payment elements is, that in the 1st configuration, we want to display only cards in the UI as allowed payment options and in the second element, Apple-pay and Google Pay.

How can we initialise both configurations using one payment element? refer: https://stripe.com/docs/payments/multiple-payment-method-configs#section-4

Please guide us to the correct approach otherwise

Configure multiple sets of payment methods for different checkout scenarios.

elfin merlin
#

Hi! I'm taking over this thread.

#

So you want multiple Payment Element loaded on the same page?

crisp coyote
#

@elfin merlin We want to display different stripe UI and payment options for different configurations, and that's why we decided to go ahead with creating separate payment elements. Is this the right approach?

elfin merlin
#

I've never tried this. Is it working or do you get an error message?

brazen minnow
#

@elfin merlin is it mandatory to call submit() before confirmPayment() ?

elfin merlin
#

That's important to know when the users clicked on the submit button and we should confirm the payment. But technically no it's not mandatory.

brazen minnow
#

Getting this error

elfin merlin
#

Oh, I didn't know that, sorry.

#

So yeah it looks like it's mandatory.

brazen minnow
#

Even if I try to call the submit method it says Uncaught TypeError: elements.submit is not a function

#

Do i need to migrate to any other stripe version currently I am using v3