1
即使我嘗試恢復我的購買並在第一步後取消,它仍會解鎖我的優質折扣。錯誤在哪裏?恢復應用內購買失敗
@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")
}
}
}