Posts

Post not yet marked as solved
6 Replies
3.1k Views
I am using In App Purchase (Auto Renewable Subscription) in our application, and when we validate the receipt on a device where the app is just installed, it returns a status of 0. Even if any purchase was not initiated from the device, so 0 means the receipt is valid and we provide the paid contents to the user. This happens when the app is downloaded from the AppStore. The way we are validating the receipt is as below: 1. NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; NSData *receipt = [NSData dataWithContentsOfURL:receiptURL]; 2. Then converted the receipt into base64 encoded string. 3. Created NSData object of Dictionary with values receipt-data : "Set the base64 string here" password : "Set the shared secret here" 4. Then posted it to "https://buy.itunes.apple.com/verifyReceipt" 5. Then in response I got the status as 0, which means its valid.But I haven't made any purchase from that device. Please suggest.
Posted
by Vinnay.
Last updated
.