Skip to content

Duplicated subscriptions on local development #44

Description

@zalito12

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

  1. Up local development with stripe forwarded
  2. Create a subscription
  3. Subscription is duplicated

Additional info

  • Craft version: 5.40
  • PHP version: 8.2
  • Database driver & version: Mysql
  • Plugins & versions: 1.1.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions