In App Purchase - Can get product information, but can't connect to itunes to buy
I am trying to make "In App Purchase" work in my iphone application.
I have created several products and several test accounts in itunes connect.
I have no problem returning product data (prices, etc.), but when I try to make a payment - Please login - I am using a test account -> the transaction always fails with the following error:
failedTransaction with error: Error Domain = SKErrorDomain Code = 2 "Connexion Γ liTunes Store not possible" UserInfo = 0x65d02a0 {NSLocalizedDescription = Connexion Γ liTunes Store not possible}
I tried several products and a test account (even in other stores like us) but I still get the same error ...
NB: I think it worked fine the first time I tried it, but it never was
Any idea would be appreciated!
thanks
a source to share
For me, I was just combing through my code until I found my error. I was sure that everything was in order, but it is not. When I requested product information from the store, I used the correct product ID:
self.productRequest= [[[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject: @"com.popculturesoft.RC_vCar.fullVersion"]] autorelease];
However, when I went to create a payment, I was using the wrong product ID:
SKPayment *payment = [SKPayment paymentWithProductIdentifier:@"com.popculturesoft.RC_vCar_Lite.fullVerson"];
Using the Payment ID product is not the correct way to do this, although it does. Better to use the SKProduct object. (I set the fullProduct property earlier in the code:
SKPayment *payment = [SKPayment paymentWithProduct:self.fullProduct];
I was pretty sure the store had fallen, and that was the problem. But the next day I decided to start by starting the process as described at http://developer.apple.com/library/ios/#technotes/tn2259/_index.html . This is when I found my wrong product id was the problem.
a source to share