SKPaymentTransactionStateFailed, but no error property returned?

Hi. We have an app with IAP coin purchases. We've recently received mail from one of our users, saying he couldn't purchase any coins. I looked at his session logs and saw 3 Failed IAP events, but no fail reason logged. Here's the related code:


- (void)_purchaseRequestFailed:(SKPaymentTransaction *)transaction state:(StoreTransactionState)state error:(NSError *)error

{

IAPProduct *product = [self getProductWithId:transaction.payment.productIdentifier];

if (error.code==SKErrorPaymentCancelled) {

[_metricsManager logFailIAP:product failReason:@"Payment canceled"];

} else {

[_metricsManager logFailIAP:product failReason:error.localizedDescription];

}

if ([_delegate respondsToSelector:@selector(didSucceedPurchasingProduct:)]) {

[_delegatedidFailPurchasingProduct:product];

}

}


---- inside logFailIAP:

if (failReason != nil && failReason.length > 0) {

[metricsDictionary setObject:failReason forKey:MetricsEventParameterFailReason];

}


-------


My question is: is there any case where, you get "SKPaymentTransactionStateFailed" but, have an empty error.localizedDescription? My guess is, this is caused by a faulty internet connection, but I can't be sure, because Apple does not list the possible errors.

iPhone 3GS, iOS 4.3.3

Posted on Mar 13, 2013 8:59 PM

Reply

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

SKPaymentTransactionStateFailed, but no error property returned?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.