-
Notifications
You must be signed in to change notification settings - Fork 48
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
Payment to manual invoice causes webhook error #317
Comments
Thanks for reporting this was fixed in version 5.0.4.2 https://github.com/craftcms/commerce-stripe/blob/5.x/CHANGELOG.md#5042---2024-08-12 |
Thanks for the response, unfortunately this particular issue is still not resolved. I am on version
I believe the issue is in assuming that the invoice
|
Thanks for the explainer. I have fixed for the next release. To get the fix early, change your "require": {
"craftcms/commerce-stripe": "5.x-dev#bbfde14dc1b74010e5d6917ecd6d223f3400161a as 5.0.4.4",
"...": "..."
} Then run We will update this ticket once the release is out. |
Stripe for Commerce version Thanks! |
Description
If an invoice is created manually using Stripe dashboard and a customer pays that invoice, the
invoice.payment_succeeded
event is sent with anull
subscription, e.g.:In this case, this plugin attempts to find a subscription using a
null
reference, which errors withStripe\Exception\InvalidArgumentException
The resource ID cannot be null or whitespace.commerce-stripe/src/base/SubscriptionGateway.php
Lines 895 to 903 in baa6709
I think it should ignore the event when the
subscription
property isnull
, because it's not applicable to Craft CMS.(I think the existing behavior doesn't cause any serious problems in Craft, but having errors thrown for improperly handled situations makes it more difficult to determine when there are important errors that require more urgent attention.)
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: