#pawan_code

1 messages ¡ Page 1 of 1 (latest)

tawny compassBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1290555213916147713

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

earnest bluff
#

Hi @split cradle

night onyxBOT
earnest bluff
#

Hi @desert nexus

#

Are you there

desert nexus
#

Thanks for waiting! Discord is busy. Looking into it now

#

Could you summarise your issue and what you would like to achieve?

earnest bluff
#

Still you didn't get after the above thread let me know ?

desert nexus
#

What is the question? I don't see any question from the previous thread

earnest bluff
#

I am Using Stripe Payment Element to Show the Credit Card Form for My react Based Application In Which In Chekout i am Having Two Step Confirmation [Review Order Page & Place Order Page]

  1. After Entering the Card Details Navigating to Review Order Page [ OnClick of Review Order Button ]

  2. From Review Order Page After Reviewing the Details Placing the Order on Click of Place Order.

#

I want to Show The Saved Payment for The Customer And Place The Order With Saved Card

#

As Provided in Document
.

desert nexus
#

This looks right to me. What is the issue here?

earnest bluff
#

As Given in the Doc i am creating Customer Session and Passing the customerSessionClientSecret in elements Options As Per Doc to Show The Checkbox to Save Payment.

and I am getting the Checkbox as well

#

Here Is The Snippet of Creating Customer Session

#

I Hope Till Here Everything is Clear to You @desert nexus

desert nexus
#

At this point, this is clear to me

earnest bluff
#

Now Issue I am Facing Is When I Checked the Checkbox and Place the Order Card in not Saving for that customer

As Per Doc It Should Actomatic Handle

desert nexus
#

Could you share your development website, so that I can check what could the reason be? For example, creating a customer without payment method, then I'll add the card myself and checkout again to check payment method isn't saved or not displayed

earnest bluff
#

Its in My Local Host Currently I am Working on This feature

#

Just to update you the Flow When i am Landing to The Payment Page then We Are Creating Payment Intent and then Once User enters the Card Details correctly then Basen on Event
paymentElement.on('change', function(event) Creating the Payment Method

desert nexus
#

Could you share the request ID (req_xxx) which you use to create a payment method?

earnest bluff
#

In this Journey no where i am passing setup_future_usage = 'off_session' in Payment Intent

& allow_redisplay: 'always' in Payment methid

desert nexus
#

Why do you create the Payment Method manually in paymentElement.on('change', function(event)? This step is not necessary

#

paymentElement.on('change', function(event) is to show any change on the Paymetn Element, it's not to create a Payment Method

#

By default, setup_future_usage = 'off_session' will save the payment method to the customer automatically after completing the payment

earnest bluff
#

if you noticed here in elementOptions i am Passing PaymentMethodcreation as Manual

earnest bluff
#

Hi @desert nexus is there any option to connect over call ?

#

PM id : pm_1Q50LfHBIoGyEgRJ7QaLCmoJ

desert nexus
#

That's not how the deferred integration works. You shouldn't use paymentElement.on('change', ...) to create a Payment Method. You're mixing the integration between deferred and non-deferred flows.

I'd recommend checking the guide here: https://docs.stripe.com/payments/build-a-two-step-confirmation. To put it simply, you will use the submit button to create the payment method first, then confirm it later. When you create a payment method, it won't be shown in the Payment Element in the same session. The saved payment method will only be shown in the next time when customer returns for payment

Add an optional review page or run validations after a user enters their payment details.

earnest bluff
#

Yes I am Already Reffering to this Document

#

My Concern Is Why Its Not Setting the Paymentntent as setup_future_usage = 'off_session'

#

Yes I Completly Agree with your Points and I knew it

When you create a payment method, it won't be shown in the Payment Element in the same session. The saved payment method will only be shown in the next time when customer returns for payment

desert nexus
#

Let's step back here. Which integration doc are you following? You should only use either one:

  1. Direct payment integration: https://docs.stripe.com/payments/save-during-payment?platform=web&ui=elements#save-payment-methods
  2. Deferred intent integration with two step flow: https://docs.stripe.com/payments/build-a-two-step-confirmation

Your code shows deferred intent integration, but you're pointing me to the direct payment integration doc

Add an optional review page or run validations after a user enters their payment details.

earnest bluff
desert nexus
#

Could you share the Payment Intent (pi_xxx) which you expect it to have setup_future_usage added automatically?