Skip to content

Commit 052ce72

Browse files
authored
Merge pull request #112 from tockn/did-fail-to-renew
Add NotificationType "DID_FAIL_TO_RENEW"
2 parents a3f651b + 0aa2740 commit 052ce72

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

appstore/notification.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const (
1919
NotificationTypeDidChangeRenewalPreference NotificationType = "DID_CHANGE_RENEWAL_PREF"
2020
// Customer changed the subscription renewal status. Current active plan is not affected.
2121
NotificationTypeDidChangeRenewalStatus NotificationType = "DID_CHANGE_RENEWAL_STATUS"
22+
// Subscription failed to renew due to a billing issue.
23+
NotificationTypeDidFailToRenew NotificationType = "DID_FAIL_TO_RENEW"
2224
)
2325

2426
type NotificationEnvironment string
@@ -89,7 +91,7 @@ type SubscriptionNotification struct {
8991
// Posted also if the notification_type is INITIAL_BUY.
9092
// Not posted for notification_type CANCEL.
9193
// Deprecated: use UnifiedReceipt.LatestReceipt instead. See details: https://developer.apple.com/documentation/appstoreservernotifications/ .
92-
LatestReceipt string `json:"latest_receipt"`
94+
LatestReceipt string `json:"latest_receipt"`
9395
// Deprecated: use UnifiedReceipt.LatestReceiptInfo instead. See details: https://developer.apple.com/documentation/appstoreservernotifications/ .
9496
LatestReceiptInfo NotificationReceipt `json:"latest_receipt_info"`
9597

@@ -98,7 +100,7 @@ type SubscriptionNotification struct {
98100

99101
// Posted only if the notification_type is RENEWAL or CANCEL or if renewal failed and subscription expired.
100102
// Deprecated: see details: https://developer.apple.com/documentation/appstoreservernotifications/ .
101-
LatestExpiredReceipt string `json:"latest_expired_receipt"`
103+
LatestExpiredReceipt string `json:"latest_expired_receipt"`
102104
// Deprecated: see details: https://developer.apple.com/documentation/appstoreservernotifications/ .
103105
LatestExpiredReceiptInfo NotificationReceipt `json:"latest_expired_receipt_info"`
104106

0 commit comments

Comments
 (0)