You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, this plugin attempts to find a subscription using a null reference, which errors with Stripe\Exception\InvalidArgumentExceptionThe resource ID cannot be null or whitespace.
I think it should ignore the event when the subscription property is null, 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
Manually invoice (using Stripe Dashboard) and pay
Additional info
Craft CMS version: 4.13.9
Stripe for Craft Commerce version: 4.1.5.1
PHP version: 8.0.30
Database driver & version:
Plugins & versions:
The text was updated successfully, but these errors were encountered:
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: