From 868337e7b9836c182bdd69ecd8ce9ffbea9c5d55 Mon Sep 17 00:00:00 2001 From: Jerry <85411418@qq.com> Date: Mon, 13 Nov 2023 10:24:33 +0800 Subject: [PATCH] update TransactionItem field --- apple/transaction_model.go | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/apple/transaction_model.go b/apple/transaction_model.go index 2a91c31d..a46bc3aa 100644 --- a/apple/transaction_model.go +++ b/apple/transaction_model.go @@ -23,22 +23,32 @@ type TransactionHistoryRsp struct { // Doc: https://developer.apple.com/documentation/appstoreserverapi/jwstransactiondecodedpayload type TransactionsItem struct { jwt.StandardClaims - TransactionId string `json:"transactionId"` - OriginalTransactionId string `json:"originalTransactionId"` - WebOrderLineItemId string `json:"webOrderLineItemId"` + AppAccountToken string `json:"appAccountToken"` BundleId string `json:"bundleId"` + Currency string `json:"currency"` + Environment string `json:"environment"` + ExpiresDate int64 `json:"expiresDate"` + InAppOwnershipType string `json:"inAppOwnershipType"` + IsUpgraded bool `json:"isUpgraded"` + OfferDiscountType string `json:"offerDiscountType"` + OfferIdentifier string `json:"offerIdentifier"` + OfferType int `json:"offerType"` + OriginalPurchaseDate int64 `json:"originalPurchaseDate"` + OriginalTransactionId string `json:"originalTransactionId"` + Price int64 `json:"price"` ProductId string `json:"productId"` - SubscriptionGroupIdentifier string `json:"subscriptionGroupIdentifier"` PurchaseDate int64 `json:"purchaseDate"` - OriginalPurchaseDate int64 `json:"originalPurchaseDate"` - ExpiresDate int64 `json:"expiresDate"` Quantity int `json:"quantity"` - Type string `json:"type"` - InAppOwnershipType string `json:"inAppOwnershipType"` + RevocationDate int64 `json:"revocationDate"` + RevocationReason string `json:"revocationReason"` SignedDate int64 `json:"signedDate"` - OfferType int `json:"offerType"` - Environment string `json:"environment"` - AppAccountToken string `json:"appAccountToken"` + Storefront string `json:"storefront"` + StorefrontId string `json:"storefrontId"` + SubscriptionGroupIdentifier string `json:"subscriptionGroupIdentifier"` + TransactionId string `json:"transactionId"` + TransactionReason string `json:"transactionReason"` + Type string `json:"type"` + WebOrderLineItemId string `json:"webOrderLineItemId"` } func (s *SignedTransaction) DecodeSignedTransaction() (ti *TransactionsItem, err error) {