Skip to content

Commit

Permalink
update TransactionItem field
Browse files Browse the repository at this point in the history
  • Loading branch information
iGoogle-ink committed Nov 13, 2023
1 parent cf13c72 commit 868337e
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions apple/transaction_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 868337e

Please sign in to comment.