|
@@ -35,6 +35,14 @@ public struct Purchase {
|
|
|
public let needsFinishTransaction: Bool
|
|
|
}
|
|
|
|
|
|
+public struct PurchaseDetails {
|
|
|
+ public let productId: String
|
|
|
+ public let quantity: Int
|
|
|
+ public let product: SKProduct
|
|
|
+ public let transaction: PaymentTransaction
|
|
|
+ public let needsFinishTransaction: Bool
|
|
|
+}
|
|
|
+
|
|
|
//Conform to this protocol to provide custom receipt validator
|
|
|
public protocol ReceiptValidator {
|
|
|
func validate(receipt: String, password autoRenewPassword: String?, completion: @escaping (VerifyReceiptResult) -> Void)
|
|
@@ -58,7 +66,7 @@ public struct RetrieveResults {
|
|
|
|
|
|
// Purchase result
|
|
|
public enum PurchaseResult {
|
|
|
- case success(purchase: Purchase)
|
|
|
+ case success(purchase: PurchaseDetails)
|
|
|
case error(error: SKError)
|
|
|
}
|
|
|
|