Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated subscriptions on local development #44

Open
zalito12 opened this issue Nov 5, 2024 · 0 comments
Open

Duplicated subscriptions on local development #44

zalito12 opened this issue Nov 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@zalito12
Copy link

zalito12 commented Nov 5, 2024

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
@zalito12 zalito12 added the bug Something isn't working label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant