Open tomfischerNL opened 1 year ago
Did you understand my problem? Let me know if it is something that you can fix? :)
Yes, I identified the issue. I'll dig into it
Hi @tomfischerNL Does this happens only on subscriptions?
Hi @andrelopez, no, also to every paymentForm as well.
Hi @andrelopez, what is the cuurent status?
@andrelopez, can you please fix this?
Hi @tomfischerNL I apologize for the delay in responding to your message. I understand that you are looking to attach a payment form with a Product (Price). I'd be happy to assist you with that.
Stripe Payments Pro will help you to achieve this you'll first need to synchronize your product and prices. You can refer to our documentation on how to sync your product and prices for detailed instructions.
Once you have synchronized your product and prices, you can use the Checkout Twig tag to create the payment form. We have provided various examples in our documentation to guide you through the process. You can find them here.
If you have any further questions or need additional assistance, please feel free to reach out. I am happy to help!
Also, you can find a video tutorial on how to use the new Checkout twig tag starting here at 01:10:00 and ending here at 01:26:00
Hi @andrelopez, we use the Stripe Payments Pro, but not the checkout tag because we need a lot of extra data of the customer so that is why we use the form with the fields. But not synced with our products, because the plug-in created already hundreds of products.
Every time we render the {{ craft.enupalStripe.paymentForm('form', paymentOptions) }}
, it creates a new product in. Stripe, but is is unnecessary, because we add the lineItems manually.
lineItems : [
{
"price": entry.stripePriceId,
"quantity": 2
}
]
Why does it make a new product in stripe every time...
@andrelopez , did you see my comment?
@tomfischerNL I am looking into this now
@tomfischerNL could you please share your plugin and craft cms version? also if you can share the full example of your paymentOptions
variable on your templates?
Hi @andrelopez,
Stripe Payments: 5.3.1 Craft version: 4.5.2
This is the code that i'm using:
{% set paymentOptions = {
checkoutImages: {0: entry.image is not empty ? entry.image[0].getUrl('image') },
checkoutSuccessUrl: currentUrl ~ '/thanks?o={number}',
checkoutCancelUrl: currentUrl ~ '?a=canceled',
removeDefaultItem: true,
lineItems : [
{
"price": currentBook['stripePriceId'],
"quantity": 1
}
]
} %}
{{ craft.enupalStripe.paymentForm('paymentFormBook', paymentOptions) }}
So nothing special. But after every payment there will be a new product in Stripe as mentioned before.
Hi @tomfischerNL I was unable to recreate your issue, I created a Product 2023
on Stripe with a one-time payment price, and this price_id looks correctly associated with the payment on Stripe. No new product created on my side.
Could you please send me a screenshot to see how it looks? you can use support@enupal.com if you want.
Also, what Stripe API version are you using? you can check this under the Stripe Dashboard -> Developers
Also, are you using Stripe Checkout ?
Also, are you using the beforeCreateSession
on a custom plugin? I remember you were trying to pass custom params a while ago here, may be worth checking any custom plugin or module. To start debugging I need to recreate the issue on my local dev
hi @andrelopez ,
I will send you an email with more info ;) Better then here on github.
Hi Andre,
No we don't use any other custom code except for the recaptcha implementation anymore. The rest is still as regular.
Maybe we can have a quick Google Meet call? Then I can show it, maybe easier to debug?
Any follow up on this?
Hi @andrelopez, every time a paymentForm is submitted, in Stripe a new product is created. This is very unhandy to check statistics in Stripe about sales per product etc. Is it possible to link a paymentForm/Payment to a specific Stripe product?
Thanks in advance!