-
Notifications
You must be signed in to change notification settings - Fork 796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type of ReceiptInfo = [String: AnyObject], but it needs to be actual type #65
Comments
Apologies for the late reply. @Joker666 Just to clarify what needs to be implemented, are you suggesting to modify the In other words, refactor this:
to:
For reference, this Stack overflow thread summarises quite well the topic of receipt validation, with information about how it's been done on RMStore: http://stackoverflow.com/questions/19943183/a-complete-solution-to-locally-validate-an-in-app-receipts-and-bundle-receipts-o |
Release 0.9.0 introduces a public struct ReceiptItem {
// The product identifier of the item that was purchased. This value corresponds to the productIdentifier property of the SKPayment object stored in the transaction’s payment property.
public let productId: String
// The number of items purchased. This value corresponds to the quantity property of the SKPayment object stored in the transaction’s payment property.
public let quantity: Int
// The transaction identifier of the item that was purchased. This value corresponds to the transaction’s transactionIdentifier property.
public let transactionId: String
// For a transaction that restores a previous transaction, the transaction identifier of the original transaction. Otherwise, identical to the transaction identifier. This value corresponds to the original transaction’s transactionIdentifier property. All receipts in a chain of renewals for an auto-renewable subscription have the same value for this field.
public let originalTransactionId: String
// The date and time that the item was purchased. This value corresponds to the transaction’s transactionDate property.
public let purchaseDate: Date
// For a transaction that restores a previous transaction, the date of the original transaction. This value corresponds to the original transaction’s transactionDate property. In an auto-renewable subscription receipt, this indicates the beginning of the subscription period, even if the subscription has been renewed.
public let originalPurchaseDate: Date
// The primary key for identifying subscription purchases.
public let webOrderLineItemId: String
// The expiration date for the subscription, expressed as the number of milliseconds since January 1, 1970, 00:00:00 GMT. This key is only present for auto-renewable subscription receipts.
public let subscriptionExpirationDate: Date?
// For a transaction that was canceled by Apple customer support, the time and date of the cancellation. Treat a canceled receipt the same as if no purchase had ever been made.
public let cancellationDate: Date?
public let isTrialPeriod: Bool
} Closing this as it's now resolved. |
The receipt validation info for non-consumables contains all the history of previously purchased products. But the type is just a dictionary.
ReceiptInfoField is just an enum of string.
The RMStore has an actual type for receipts https://github.com/robotmedia/RMStore/blob/master/RMStore/Optional/RMAppReceipt.h
The text was updated successfully, but these errors were encountered: