Instance Method

paymentQueue:updatedTransactions:

Tells an observer that one or more transactions have been updated.

Required.

Declaration

- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray<SKPaymentTransaction *> *)transactions;

Parameters

queue

The payment queue that updated the transactions.

transactions

An array of the transactions that were updated.

Discussion

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.

See Also

Handling Transactions

- paymentQueue:removedTransactions:

Tells an observer that one or more transactions have been removed from the queue.