即使我尝试恢复购买并在第一步后取消它仍然会解锁我的高级stoff。错误在哪里?
@IBAction func restorePurchase(sender: UIButton) {
SKPaymentQueue.defaultQueue().addTransactionObserver(self)
SKPaymentQueue.defaultQueue().restoreCompletedTransactions()
}
func paymentQueueRestoreCompletedTransactionsFinished(queue: SKPaymentQueue) {
for transaction in queue.transactions {
let t: SKPaymentTransaction = transaction
let prodID = t.payment.productIdentifier as String
switch prodID {
case "xxxxxxxxxxxx":
purchaseedVoid()
default:
print("IAP")
}
}
}