Description
When you are working on local development with forwarded stripe events, the customer.subscription.created and customer.subscription.updated events are received almost at the same time and, as updating use createOrUpdateSubscription, the subscriptions are created 2 times.
My idea is to use a specific update method instead of
|
$plugin->getSubscriptions()->createOrUpdateSubscription($subscription); |
Steps to reproduce
- Up local development with stripe forwarded
- Create a subscription
- Subscription is duplicated
Additional info
- Craft version: 5.40
- PHP version: 8.2
- Database driver & version: Mysql
- Plugins & versions: 1.1.0
Description
When you are working on local development with forwarded stripe events, the
customer.subscription.createdandcustomer.subscription.updatedevents are received almost at the same time and, as updating usecreateOrUpdateSubscription, the subscriptions are created 2 times.My idea is to use a specific update method instead of
stripe/src/services/Webhooks.php
Line 97 in fa70b83
Steps to reproduce
Additional info