paymentQueue(_:updatedTransactions:)
Tells an observer that one or more transactions have been updated.
Declaration
func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction])Parameters
- queue:
The payment queue that updated the transactions.
- transactions:
An array of the transactions that were updated.
Mentioned in
Discussion
The application should process each transaction by examining the transaction’s transactionState property. If transactionState is SKPaymentTransactionState.purchased, payment was successfully received for the desired functionality. The application should make the functionality available to the user. If transactionState is SKPaymentTransactionState.failed, 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
Related Documentation
- In-App Purchase Programming Guide