I've set up some non-consumable IAP's in my application.
I'm being returned a list of my IAP SKProducts via the SKProductsRequestDelegate method -productsRequest:didReceiveResponse
.
I'm also purchasing the IAP's (in Sandbox) just fine via the SKPaymentQueue, and the SKPaymentTransactionObserver delegate method -paymentQueue:updatedTransactions
.
Now what I would like to do, is implement receipt validation against my server.
I notice the CargoBay readme, has the following code...
[[CargoBay sharedManager] verifyTransaction:transaction password:nil success:^(NSDictionary *receipt) {
NSLog(@"Receipt: %@", receipt);
} failure:^(NSError *error) {
NSLog(@"Error %d (%@)", [error code], [error localizedDescription]);
}];
Can CargoBay be used, when you want to validation to be done on your server?
How does this process work? What I want to do is something like... send the purchase receipt to my server from my app, then send it from my server to Apple to validate. If validated, my server will provide the purchased content, and finally return any necessary information to my application, such as success/failure and possible content objects.
How do I achieve this?
I assume I kick it all off from inside -paymentQueue:updatedTransactions
? Is that right? Where do I go and what do I do from there? Where do I obtain the receipt from, and once sent to my server, how do I validate it with Apple?