We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/bizz84/SwiftyStoreKit#payment-flows-implementation-details Payment flows: implementation details In order to make a purchase, two operations are needed: Perform a SKProductRequest to obtain the SKProduct corresponding to the product identifier. Submit the payment and listen for updated transactions on the SKPaymentQueue. The framework takes care of caching SKProducts so that future requests for the same SKProduct don't need to perform a new SKProductRequest. Payment queue The following list outlines how requests are processed by SwiftyStoreKit. SKPaymentQueue is used to queue payments or restore purchases requests. Payments are processed serially and in-order and require user interaction. Restore purchases requests don't require user interaction and can jump ahead of the queue. SKPaymentQueue rejects multiple restore purchases calls. Failed transactions only ever belong to queued payment requests. restoreCompletedTransactionsFailedWithError is always called when a restore purchases request fails. paymentQueueRestoreCompletedTransactionsFinished is always called following 0 or more update transactions when a restore purchases request succeeds. A complete transactions handler is require to catch any transactions that are updated when the app is not running. Registering a complete transactions handler when the app launches ensures that any pending transactions can be cleared. If a complete transactions handler is missing, pending transactions can be mis-attributed to any new incoming payments or restore purchases. The order in which transaction updates are processed is: payments (transactionState: .purchased and .failed for matching product identifiers) restore purchases (transactionState: .restored, or restoreCompletedTransactionsFailedWithError, or paymentQueueRestoreCompletedTransactionsFinished) complete transactions (transactionState: .purchased, .failed, .restored, .deferred) Any transactions where state is .purchasing are ignored. See this pull request for full details about how the payment flows have been implemented.
https://github.com/bizz84/SwiftyStoreKit#payment-flows-implementation-details
In order to make a purchase, two operations are needed:
Perform a SKProductRequest to obtain the SKProduct corresponding to the product identifier.
SKProductRequest
SKProduct
Submit the payment and listen for updated transactions on the SKPaymentQueue.
SKPaymentQueue
The framework takes care of caching SKProducts so that future requests for the same SKProduct don't need to perform a new SKProductRequest.
The following list outlines how requests are processed by SwiftyStoreKit.
restoreCompletedTransactionsFailedWithError
paymentQueueRestoreCompletedTransactionsFinished
The order in which transaction updates are processed is:
.purchased
.failed
.restored
.deferred
Any transactions where state is .purchasing are ignored.
.purchasing
See this pull request for full details about how the payment flows have been implemented.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: