#jonastex_api
1 messages ¡ Page 1 of 1 (latest)
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.
- jonastex_api, 19 hours ago, 30 messages
đ 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/1227195726161903688
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! can you explain in a bit more detail, or show me an example?
Yes, here is the code I use to do this```php
$product_create = $stripe_fp_stripe_create_abonnement->products->create([
'name' => $name_product,
'type' => 'service',
]);
$plan = $stripe_fp_stripe_create_abonnement->plans->create([
'product' => $product_create->id,
'amount' => 1000,
'currency' => 'eur',
'interval' => 'month',
'interval_count' => 1,
]);```
makes sense. And what does "creates a second identical product" mean? That code does not create anything except one Product and one Price.
Do you have examples(like the object IDs) of these identical products
Yes he create 2 product, but when i just execute this code php $product_create = $stripe_fp_stripe_create_abonnement->products->create([ 'name' => $name_product, 'type' => 'service', ]);
he create 1 product but it is dosen't configure. I my dashbord i can see they 2 products. https://gyazo.com/437a71c154ab0bd6e3f61860d329feb9
And this is id : plan_PtOKSKlgZgJwzu & plan_PtOKkLTGy870sP
you can look at your account logs and see you called the API twice
so you have some bug in your code and you call ->plans->create twice.
actually you call this entire script(creating the Product, and creating the Price) twice, it seems.
you can easily confirm that by adding a log line in the script and seeing that it's being called twice, and then start debugging why that's happening
Indeed, I just made a form that redirects to the page where I call the function, and now it executes only once. But when I directly load the page from the URL, it loads it twice. Thank you for your help, I don't yet have the reflex to check the Stripe logs, it's very useful 
happy to help!