From c61599bf8e773d1f43c5f5b5262c08c84bd3f1c8 Mon Sep 17 00:00:00 2001 From: tockn Date: Wed, 19 Feb 2020 23:45:54 +0900 Subject: [PATCH 1/2] go fmt --- appstore/notification.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appstore/notification.go b/appstore/notification.go index d68fbdc..648d857 100644 --- a/appstore/notification.go +++ b/appstore/notification.go @@ -89,7 +89,7 @@ type SubscriptionNotification struct { // Posted also if the notification_type is INITIAL_BUY. // Not posted for notification_type CANCEL. // Deprecated: use UnifiedReceipt.LatestReceipt instead. See details: https://developer.apple.com/documentation/appstoreservernotifications/ . - LatestReceipt string `json:"latest_receipt"` + LatestReceipt string `json:"latest_receipt"` // Deprecated: use UnifiedReceipt.LatestReceiptInfo instead. See details: https://developer.apple.com/documentation/appstoreservernotifications/ . LatestReceiptInfo NotificationReceipt `json:"latest_receipt_info"` @@ -98,7 +98,7 @@ type SubscriptionNotification struct { // Posted only if the notification_type is RENEWAL or CANCEL or if renewal failed and subscription expired. // Deprecated: see details: https://developer.apple.com/documentation/appstoreservernotifications/ . - LatestExpiredReceipt string `json:"latest_expired_receipt"` + LatestExpiredReceipt string `json:"latest_expired_receipt"` // Deprecated: see details: https://developer.apple.com/documentation/appstoreservernotifications/ . LatestExpiredReceiptInfo NotificationReceipt `json:"latest_expired_receipt_info"` From 0aa274084a0858b6968b6dd04fe7058e2f42211c Mon Sep 17 00:00:00 2001 From: tockn Date: Wed, 19 Feb 2020 23:52:19 +0900 Subject: [PATCH 2/2] add notification type DID_FAIL_TO_RENEW --- appstore/notification.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appstore/notification.go b/appstore/notification.go index 648d857..3f1bacc 100644 --- a/appstore/notification.go +++ b/appstore/notification.go @@ -19,6 +19,8 @@ const ( NotificationTypeDidChangeRenewalPreference NotificationType = "DID_CHANGE_RENEWAL_PREF" // Customer changed the subscription renewal status. Current active plan is not affected. NotificationTypeDidChangeRenewalStatus NotificationType = "DID_CHANGE_RENEWAL_STATUS" + // Subscription failed to renew due to a billing issue. + NotificationTypeDidFailToRenew NotificationType = "DID_FAIL_TO_RENEW" ) type NotificationEnvironment string