Documentation ¶
Overview ¶
Code generated by gen.go. DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppReceipt ¶
type AppReceipt struct { // The app’s bundle identifier. BundleIdentifier string // The app’s version number. AppVersion string // An opaque value used, with other data, to compute the SHA-1 hash during validation. OpaqueValue []byte // A SHA-1 hash, used to validate the receipt. SHA1Hash []byte // The receipt for an in-app purchase. InAppPurchaseReceipts []InAppPurchaseReceipt // The version of the app that was originally purchased. OriginalApplicationVersion string // The date when the app receipt was created. ReceiptCreationDate time.Time // The date that the app receipt expires. ReceiptExpirationDate time.Time // Undocumented attributes Remaining []ReceiptAttribute }
func Decode ¶
func Decode(receipt []byte, certPool *x509.CertPool) (AppReceipt, error)
Decode decodes given receipt binary into AppReceipt type. It verifies the payload with given certPool. certPool can be nil to skip verification, but be careful that users can pass a forged receipt.
func DecodeBase64 ¶
func DecodeBase64(b64Receipt string, certPool *x509.CertPool) (AppReceipt, error)
DecodeBase64 decodes given base64-encoded receipt into AppReceipt type. It verifies the payload with given certPool. certPool can be nil to skip verification, but be careful that users can pass a forged receipt.
type InAppPurchaseReceipt ¶
type InAppPurchaseReceipt struct { // The number of items purchased. Quantity int // The product identifier of the item that was purchased. ProductIdentifier string // The transaction identifier of the item that was purchased. TransactionIdentifier string // For a transaction that restores a previous transaction, the transaction identifier of the original transaction. Otherwise, identical to the transaction identifier. OriginalTransactionIdentifier string // The date and time that the item was purchased. PurchaseDate time.Time // For a transaction that restores a previous transaction, the date of the original transaction. OriginalPurchaseDate time.Time // The expiration date for the subscription, expressed as the number of milliseconds since January 1, 1970, 00:00:00 GMT. SubscriptionExpirationDate time.Time // For an auto-renewable subscription, whether or not it is in the introductory price period. SubscriptionIntroductoryPricePeriod int // For a transaction that was canceled by Apple customer support, the time and date of the cancellation. For an auto-renewable subscription plan that was upgraded, the time and date of the upgrade transaction. CancellationDate time.Time // The primary key for identifying subscription purchases. WebOrderLineItemID int // Undocumented attributes Remaining []ReceiptAttribute }
type ReceiptAttribute ¶
Click to show internal directories.
Click to hide internal directories.