enupal / stripe

Allows customers sign up for recurring and one-time payments with Stripe, perfect for orders, donations, subscriptions, and events. Create simple payment forms in seconds easily without coding. For Craft CMS
https://enupal.com/craft-plugins/stripe-payments/
Other
33 stars 19 forks source link

Missing metadata in first post towards stripe #353

Closed bob-pixeldeluxe closed 9 months ago

bob-pixeldeluxe commented 1 year ago

Description

So this was working before and we did not make any changes to the form since. Now when we make an order with a single product In stripe we can see the metadata in POST /v1/checkout/sessions (in the payment page of this order)

metadata": {
    "0": "{\"evenement\":\"13487\",\"lidmaatschap\":\"Niet lid\",\"naam\":\"Tessa hardloper\",\"lidnummer\":\"\",\"geslacht\":\"Vrouw\",\"geboortedatum\":\"\",\"dieetwensen\":\"123\",\"rolstoel\":\"\",\"activiteiten\":[\"13793\",\"13798\"]}",
    "stripe_payments_user_id": "1",
    "stripe_payments_cart_number": "cart_number"
  },

However if we now order multiple products (2 in this case) The metadata look like this.

"metadata": {
    "stripe_payments_user_id": "1",
    "stripe_payments_cart_number": "cart_number"
  },

No changes were made in the form or our code since (We did update yesterday because we had the 10 limit prices bug as well)

Steps to reproduce

order multiple products which contain a few different prices.

Additional info

bob-pixeldeluxe commented 1 year ago

So it seems like it has something to do with ordering many different prices. I can order 3 prices of a single product. However if i order more the metadata in the first api post is missing the price data.

andrelopez commented 1 year ago

Hi @bob-pixeldeluxe could you please help me to recreate this issue? are you using the Stripe Checkout twig tag?

bob-pixeldeluxe commented 1 year ago

Hi @andrelopez, No we are not using the twig, We have multiple add to cart forms for each product. In each form the custom can choose multiple prices within the product to order. On submit each product is added to cart via seperate forms. I think the problem is that the cart is not being created in the database.

My colleague is gonna do some more research into this tomorrow. We will get back to you.

andrelopez commented 9 months ago

Feel free to re-open, closing for now