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

Unable to create subscription using Stripe Elements #295

Closed
d-karstens opened this issue Jun 23, 2022 · 2 comments
Closed

Unable to create subscription using Stripe Elements #295

d-karstens opened this issue Jun 23, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@d-karstens
Copy link

Description

Hi,
We've been running into problems using Stripe Elements to create subscriptions, I've done a bit of digging and it looks like it is due to this line https://github.com/enupal/stripe/blob/master/src/services/Orders.php#L1187

Which I believe should be $subscription = Subscription::create($subscriptionSettings); to use the Stripe subscription api instead, and 'customer' => $customer, added to the $subscriptionSettings array.

I've tested it locally and it looks like subscriptions are now created properly, but I'm not sure if there's something else I'm missing

Let me know if there's any other details you need
Thanks!

Steps to reproduce

  1. Try to create a subscription using Stripe Elements and the enupal-stripe/stripe/save-order action
  2. Get a "Call to a member function create() on null" error

Additional info

  • Craft version: 4.0.5.1
  • PHP version: 8.1.7
  • Database driver & version: MySQL 10.7.1
  • Plugin version: 5.0.3
  • Is SCA and Stripe Checkout enabled?: No
@d-karstens d-karstens changed the title Unable to create subscription Unable to create subscription using Stripe Elements Jun 23, 2022
@andrelopez andrelopez self-assigned this Jun 23, 2022
@andrelopez andrelopez added the bug Something isn't working label Jun 23, 2022
@andrelopez
Copy link
Member

Hi @mokopan We just released Stripe Payments v5.0.4 with a fix to this issue. Thanks for reporting

@d-karstens
Copy link
Author

Thank you, very much appreciated!

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

2 participants