Hello experts!
I have created an app which allows users to buy non-consumable content. The retrieving-ids-payment-process works like a charm but i wish too, when the transaction is completed and the request is made to download the content, I would like to save who has downloaded this content. In my observer i have implemented method:
- (void)completeTransaction: (SKPaymentTransaction *)transaction{
NSLog(@"completeTransaction");
[[ShopHandler sharedManager] provideContent:transaction.payment.productIdentifier];
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];
}
In my ShopHandler i have the provideContent method
-(void) provideContent: (NSString*) productIdentifier {
Here i want to retrieve the user that has bought this product and
then perform a request to my server
e.g http://www.tesserver.com/download?id=com.my.id.test&[email protected]
}
So how do i retrieve that itunes id?
Edit:
Apple states in their Introducing Store Kit video in the iPhone Dev Center one we should:
"Keep a copy of the TransactionID along with the Customer Information in your server in the cloud. This way if the customer mistakenly deletes your application, you have a mechanism for recovery. You can check your server on first launch of your app for a record of the purchases for a given customer and bring that app back to its state before it was deleted. Believe me your customers will be thankful!"
So what do they mean by this?