Protocol: SKPaymentTransactionObserver
Overview
The SKPaymentTransactionObserver protocol declares methods that are implemented by observers of an SKPaymentQueue object.Tells an observer that one or more transactions have been removed from the queue.Tells the observer that an error occurred while restoring transactions.Tells the observer that the payment queue has updated one or more download objects. (required)Tells an observer that one or more transactions have been updated. (required)Tells the observer that the payment queue has finished sending restored transactions.
Instance Method Summary (collapse)
-
- paymentQueue:removedTransactions:
Tells an observer that one or more transactions have been removed from the queue.
-
- paymentQueue:restoreCompletedTransactionsFailedWithError:
Tells the observer that an error occurred while restoring transactions.
-
- paymentQueue:updatedDownloads:
Tells the observer that the payment queue has updated one or more download objects.
-
- paymentQueue:updatedTransactions:
Tells an observer that one or more transactions have been updated.
-
- paymentQueueRestoreCompletedTransactionsFinished:
Tells the observer that the payment queue has finished sending restored transactions.
Instance Method Details
- (Object) paymentQueue(queue, removedTransactions:transactions)
Tells an observer that one or more transactions have been removed from the queue. Your application does not typically need to implement this method but might implement it to update its own user interface to reflect that a transaction has been completed.
- (Object) paymentQueue(queue, restoreCompletedTransactionsFailedWithError:error)
Tells the observer that an error occurred while restoring transactions.
- (Object) paymentQueue(queue, updatedDownloads:downloads)
Tells the observer that the payment queue has updated one or more download objects. (required) When a download object is updated, its downloadState property describes how it changed.
- (Object) paymentQueue(queue, updatedTransactions:transactions)
Tells an observer that one or more transactions have been updated. (required) The application should process each transaction by examining the transaction’s transactionState property. If transactionState is SKPaymentTransactionStatePurchased, payment was successfully received for the desired functionality. The application should make the functionality available to the user. If transactionState is SKPaymentTransactionStateFailed, the application can read the transaction’s error property to return a meaningful error to the user.Once a transaction is processed, it should be removed from the payment queue by calling the payment queue’s finishTransaction: method, passing the transaction as a parameter.Important: Once the transaction is finished, Store Kit can not tell you that this item is already purchased. It is important that applications process the transaction completely before calling finishTransaction:.
- (Object) paymentQueueRestoreCompletedTransactionsFinished(queue)
Tells the observer that the payment queue has finished sending restored transactions. This method is called after all restorable transactions have been processed by the payment queue. Your application is not required to do anything in this method.