Documentation ¶
Index ¶
Constants ¶
View Source
const ( UnreadableJSON = 21000 MalformedData = 21002 AuthenticationError = 21003 UnmatchedSecret = 21004 SubscriptionExpired = 21006 SandboxReceiptOnProd = 21007 ProdReceiptOnSandbox = 21008 )
Error codes as they returned by the App Store
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorWithCode ¶
type ErrorWithCode interface {
Code() float64
}
ErrorWithCode Simple interface to get the original error code from the error object
type PurchaseReceipt ¶
type PurchaseReceipt struct { Quantity string `json:"quantity"` ProductId string `json:"product_id"` TransactionId string `json:"transaction_id"` OriginalTransactionId string `json:"original_transaction_id"` PurchaseDate string `json:"purchase_date"` OriginalPurchaseDate string `json:"original_purchase_date"` ExpiresDate string `json:"expires_date"` AppItemId string `json:"app_item_id"` VersionExternalIdentifier string `json:"version_external_identifier"` WebOrderLineItemId string `json:"web_order_line_item_id"` }
PurchaseReceipt PurchaseReceipt
type Receipt ¶
type Receipt struct { BundleId string `json:"bundle_id"` ApplicationVersion string `json:"application_version"` InApp []PurchaseReceipt `json:"in_app"` OriginalApplicationVersion string `json:"original_application_version"` }
Receipt is information returned by Apple Documentation: https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html#//apple_ref/doc/uid/TP40010573-CH106-SW10
func VerifyReceipt ¶
VerifyReceipt Given receiptData (base64 encoded) it tries to connect to either the sandbox (useSandbox true) or apples ordinary service (useSandbox false) to validate the receipt. Returns either a receipt struct or an error.
Click to show internal directories.
Click to hide internal directories.