How to confirm only one-time receipt of an in-app purchase in iOS8?

Ios7 method

SKPaymentTransaction *transaction = (SKPaymentTransaction *)object;
NSData *receiptData = [NSData dataWithData:transaction.transactionReceipt];
NSString *encodedString = [receiptData base64EncodedStringWithOptions:0];

      

Ios8 method

NSURL *receiptUrl = [[NSBundle mainBundle] appStoreReceiptURL];
NSData *receiptData = [NSData dataWithContentsOfURL:receiptUrl];
NSString *encodedString = [receiptData base64EncodedStringWithOptions:0];

      

When you confirm a recipe using the ios8 method, itunes.apple.com/verifyReceipt responds to all purchases by the user inside a JSON object. But if you are using ios7 method, itunes will be exactly responsible for the transaction (SKPaymentTransaction *)

So the question is: how to confirm only transaction one in iOS8 without deprecated methods?

PS I hope iOS8 is as flexible as iPhone6 ​​(smile)

+3
ios objective-c in-app-purchase


source to share


No one has answered this question yet

Check out similar questions:

958
How do I change the name of an iOS app?
680
How to connect to apps in the app store
253
How do I add an app purchase to an iOS app?
134
Complete solution for LOCAL check of in-app receipts and receipts packages on iOS 7
8
Base64 encoding error for iOS7 purchase receipt server validation
4
Get subscription expiration date for in-app purchases - starting at appStoreReceiptURL
3
iOS8 Authenticated App Purchase
3
Checking App Purchase Confirmation in iOS8
1
Can pure device check authenticate in real time with iOS6?
0
payment for in-app purchases



All Articles
Loading...
X
Show
Funny
Dev
Pics