#pawan_code

1 messages ¡ Page 1 of 1 (latest)

clear terraceBOT
#

👋 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/1296345466748796950

📝 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.

wraith crag
#

What is your question?

wraith void
#

Hi River,

I have an e-commerce site built with React, and in the "My Account" section under the user's profile, I want to display the Stripe Payment Element form. The goal is to collect the user's card details and save them to their Stripe account for future use.

To achieve this, I'm showing a checkbox, and the intention is to attach the payment method to the customer only when the user selects the checkbox. However, the payment method is being attached to the customer even when the checkbox is not selected.

#

Here Is The Steps what i am Using

After landing to Account - Payment Section : Creating the Customer Session [To Show the Checkbox to save the Card]
then Creating the SetupIntent
On Click of Save button Confirming the Intent [via clientSeceret]

#

Hi Hope Now my requirement is Clear to you River

wraith crag
#

Could you share the payment method ID (pm_xxx) that has been attached to customer even though the checkbox was not checked?

wraith void
#

PMId : pm_1QAmdnHBIoGyEgRJx0zK4FLR

#

PMId : pm_1QAmhuHBIoGyEgRJ2IZyGugd

#

Setup Intent Id : seti_1QAmhcHBIoGyEgRJtLQveOrv

wraith crag
#

If you use Setup Intent, the payment method will always be attached to the customer regardless whether that check box is enabled. A Setup Intent is meant to save a payment method for future usage

#

This checkbox is meant for Payment Intent flow, not Setup Intent

wraith void
#

Ok can you Please Let me Know How Can I detect Wether Checkbox is checked or not ?

wraith crag
#

StripeJS doesn't have a callback to detect whether this checkbox is checked

wraith void
#

In the Elements object, we can't directly retrieve whether the checkbox is selected. I need a boolean or some value from the Elements object to control whether the call should proceed, based on the user's checkbox selection within the elements.

wraith crag
#

Unfortunately, Stripe doesn't have a field to check whether the checkbox is selected. You'd need to implement the checkbox yourself if you would like to know the value

wraith void
#

Thanks River

#

I have One more Doubt Can you Please Guide

#

I'm facing another issue: we've enabled Amazon Pay from the dashboard, and I want to display it in the checkout process. However, I need to hide Amazon Pay in the "My Account" profile section. Could you help with that as well?
How can we Do that ?

wraith crag
#

I need to hide Amazon Pay in the "My Account" profile section
Could you share the screenshot and link on where this section you're referring to?

wraith void
#

In My Store Front Its My Account Section I Want to Hide Amazon-Pay When Rendering Payment element in Accout But I want Amazon pay to show when Payment Element is rendering in checkout