SKPaymentQueue updatedTransactions not being called : <p>I am getting "this in app purchase has already been bought it will be restored for free" but the delegate updatedTransactions is not being called and nothing happens, the IAP doesn't execute.</p>

<p>I have implemented Restore Purchase which is working fine but how do i prevent a user from making purchase for a non-consumable item again?And why is the delegate updatedTransactions(SKPaymentTransactionState.Restored) not being called? </p>

<p>Even making purchase after deleting and reinstalling the app shows this pop up.</p>

<p>Here is my code.Please let me know if i am doing anything wrong.Thanks</p>

<pre><code>func makePaymentForProduct(product:SKProduct){
    let payment = SKPayment.init(product: product)
    SKPaymentQueue.defaultQueue().addPayment(payment)
    SKPaymentQueue.defaultQueue().addTransactionObserver(self)
}

func restorePurchases(){
    SKPaymentQueue.defaultQueue().restoreCompletedTransactions()
    SKPaymentQueue.defaultQueue().addTransactionObserver(self)
}


//MARK: SKProductsRequestDelegate

func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse) {
    self.delegate?.didGetProducts(response.products)
}

func request(request: SKRequest, didFailWithError error: NSError) {
    self.delegate?.purchaseFailed(error.localizedDescription)
}

//MARK: SKPaymentTransactionObserver

func paymentQueue(queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {

    for (_, transaction) in transactions.enumerate() {
        switch (transaction.transactionState) {
        case SKPaymentTransactionState.Purchased:
            self.completeTransaction(transaction)
            break
        case SKPaymentTransactionState.Restored:
            self.restoreTransaction(transaction)
            break
        case SKPaymentTransactionState.Failed:
            self.failedTransaction(transaction)
            break
        default:
            break
        }
    }
}

func completeTransaction(transaction:SKPaymentTransaction){
    self.delegate?.purchaseSuccessful()
    SKPaymentQueue.defaultQueue().finishTransaction(transaction)
}

func restoreTransaction(transaction:SKPaymentTransaction){
    self.delegate?.purchaseSuccessful()
    SKPaymentQueue.defaultQueue().finishTransaction(transaction)
}

func failedTransaction(transaction:SKPaymentTransaction){
    self.delegate?.purchaseFailed("")
    SKPaymentQueue.defaultQueue().finishTransaction(transaction)
}


//Restore Purchase

func paymentQueueRestoreCompletedTransactionsFinished(queue: SKPaymentQueue) {
    self.delegate?.purchaseRestored()
}

func paymentQueue(queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: NSError) {
    self.delegate?.purchaseFailed(error.localizedDescription)
}
</code></pre>
