-
-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Liap version(s) affected
1.13
Description
When receiving SUBSCRIPTION_CANCELED events from google RTDN, the error Undefined array key \"subscriptionId\" occurs on google-play-billing/src/DeveloperNotifications/SubscriptionNotification.php:66.
Other event subscriptions are not having this issue so seems to be an isolated event. This occurs without having an event listener for the SubscriptionCanceled event.
Here's an event payload from google,
[
"version" => "1.0",
"packageName" => "REDACTED",
"eventTimeMillis" => "1730917027147",
"subscriptionNotification" => [
"version" => "1.0",
"notificationType" => 3,
"purchaseToken" => "REDACTED,
],
]
The real issue seems to be on google's side with not sending a subscriptionID, however, it would be nice to be able to handle this so that we can still respond accordingly.
How to reproduce
- Create a google subscription
- Cancel subscription from Google Play Store
- See error response when receiving
SUBSCRIPTION_CANCELEDnotification
Possible Solution
Return an empty string if the subscription notification does not contain a "subscriptionId" within the create SubscriptionNotification:$attributes['subscriptionId'] ?? ""
Additional Context
No response