From 6882b6758e54e208c13db42ee8f7a5c480adaa22 Mon Sep 17 00:00:00 2001 From: sanjid133 Date: Tue, 6 Aug 2019 17:22:41 +0600 Subject: [PATCH] Verfiy latest receipt --- appstore/model.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/appstore/model.go b/appstore/model.go index c795289..a49a973 100644 --- a/appstore/model.go +++ b/appstore/model.go @@ -163,6 +163,16 @@ type ( SubscriptionRetryFlag string `json:"is_in_billing_retry_period,omitempty"` } + // The IAPLatestResponse type has the response properties + // If you use latest_receipt as token to verify, response should be like following struct + IAPLatestResponse struct { + Status int `json:"status"` + Receipt InApp `json:"receipt"` + LatestReceiptInfo InApp `json:"latest_receipt_info,omitempty"` + LatestExpiredReceiptInfo InApp `json:"latest_expired_receipt_info,omitempty"` + LatestReceipt string `json:"latest_receipt,omitempty"` + } + // The HttpStatusResponse struct contains the status code returned by the store // Used as a workaround to detect when to hit the production appstore or sandbox appstore regardless of receipt type StatusResponse struct {