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
When try to build a SubscriptionUpdated Notification from Paddle\SDK\Entities\Event::from(data), exception thrown.
Reason:
In the subscription.updated event, the event.data.discount.started_at field may be null in a special scenario. This makes the invoking of Paddle\SDK\Entities\Event::from() failed.
Steps to reproduce
create a subscription
update the subscription with and discount start from next period
cancel the subscription immediately
an subscription.updated notification will be emitted. In this notfication, the subscription.discount.starts_at is null.
when try to build Paddle\SDK\Notifications\Events\SubscriptionUpdated from this event by calling Paddle\SDK\Notifications\Events::from($data), exception thrown at Paddle\SDK\Notifications\Entities\Subscription\SubscriptionDiscount::from()
Line: 29 DateTime::from($data['starts_at'])
"message": "Paddle\SDK\Notifications\Entities\DateTime::from(): Argument #1 ($date) must be of type DateTimeInterface|string, null given,
Expected behavior
SubscriptionUpdated object can be successfully constructed from Event::from(...) call.
Code snippets
No response
PHP version
PHP 8.1
SDK version
paddle-php-sdk 1.20.1
API version
Paddle verson 1
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When try to build a SubscriptionUpdated Notification from Paddle\SDK\Entities\Event::from(data), exception thrown.
Reason:
In the subscription.updated event, the event.data.discount.started_at field may be null in a special scenario. This makes the invoking of Paddle\SDK\Entities\Event::from() failed.
Steps to reproduce
Line: 29 DateTime::from($data['starts_at'])
"message": "Paddle\SDK\Notifications\Entities\DateTime::from(): Argument #1 ($date) must be of type DateTimeInterface|string, null given,
Expected behavior
SubscriptionUpdated object can be successfully constructed from Event::from(...) call.
Code snippets
No response
PHP version
PHP 8.1
SDK version
paddle-php-sdk 1.20.1
API version
Paddle verson 1
Additional context
No response
The text was updated successfully, but these errors were encountered: