Post

Replies

Boosts

Views

Activity

Failed transaction appears in the payment queue when user tries to buy product in sandbox environment
Sometimes when the user tries to buy a product, a failed transaction appears in the payment queue.When user taps on buy button, the following code is runfunc buy(product: SKProduct) { let payment = SKPayment(product: product) SKPaymentQueue.default().add(payment) }Afterwards, the method `paymentQueue(_:updatedTransactions:)` of the registered SKPaymentTransactionObserver is called with a failed transaction.The error object of the transaction is as follows-Cannot connect to iTunes Store Error Domain=NSURLErrorDomain Code=-1200 "Cannot connect to iTunes Store" UserInfo={_kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask<E979C8A8-8B0B-498D-B086-212B6AFF4B3E>.<2>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSErrorFailingURLKey=https://sandbox.itunes.apple.com/WebObjects/MZFinance.woa/wa/inAppBuy, _NSURLErrorRelatedURLSessionTaskErrorKey=("LocalDataTask <E979C8A8-8B9B-498D-B0860212B6AFF4B3E>.<2>"), NSLocalisedDescription=Cannot connect to iTunes Store, NSErrorFailingURLStringKey=https://sandbox.itunes.apple.com/WebObjects/MZFinance.woa/wa/inAppBuy,NSUnderlyingError=0x280ad8060 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCGStreamSSLErrorOriginalValue=-9816, _kCGStreamErrorDomainKey=3, _kCGStreamErrorCodeKey=-9816}}, _kCGStreamErrorCodeKey=-9816}Can anyone point out how to solve this issue?
2
0
1.2k
Apr ’20