#rangermillze_api

1 messages ¡ Page 1 of 1 (latest)

gusty kestrelBOT
#

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

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

fleet isle
#

Hello
Give me a moment to check

hybrid python
#

hi

fleet isle
hybrid python
#

im not sure where the 1st one was created?

#

I show the payment form only once and submit the form

fleet isle
#

The first one came from the same IP so if the form wasn't submitted twice then you likely have duplicated function call

hybrid python
#

if the user has an acocunt on stripe and a previous payment method then we execute:

#

$response = $stripe->subscriptions->create([
'customer' => $customer_id,
'items' => $line_items,
'payment_behavior' => 'default_incomplete',
'payment_settings' => ['save_default_payment_method' => 'on_subscription'],
'expand' => ['latest_invoice.payment_intent']
]);

#

will this make the payment?

#

without submitting the form?

fleet isle
#

We would try to charge the payment method automatically if it is set as default payment method on the customer under their invoice settings.

But in this case the confirmation request came from your client-side code

hybrid python
#

ok, i'll check to make sure there are no duplicate calls.

#

i'll try a new user who has no account and then a user with an account.

#

does it look like stripe.confirmPayment() was executed twice?

fleet isle
#

Yup

hybrid python
#

awesome, thank @hanzo for your support!