-
Notifications
You must be signed in to change notification settings - Fork 58
Conversation
…ation. Also primitive “Restore purchases” logic. Also refactoring to avoid deprecated methods.
[[SKPaymentQueue defaultQueue] finishTransaction:transaction]; | ||
break; | ||
} | ||
} | ||
} | ||
|
||
- (NSString*)convertTransactionToJson: (SKPaymentTransaction*) transaction storeToUserDefaults:(bool)store | ||
{ | ||
//NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is new receipt validation flow. Commented due to our project needs.
//NSData *receipt = [NSData dataWithContentsOfURL:receiptURL]; | ||
//NSString *receiptBase64 = [receipt base64EncodedStringWithOptions:0]; | ||
|
||
NSString *receiptBase64 = [transaction.transactionReceipt base64EncodedStringWithOptions:0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transaction.transactionReceipt
was deprecated some time ago. But validation flow changed, so for now It still here.
http://stackoverflow.com/questions/19682663/deprecated-transactionreceipt
The newer API the receipt now contains the list of all transactions performed by the user. The documentation clearly outlines what a receipt looks like:
Meaning that if you really, really wanted to, you can iterate through all the items contained in the receipt to validate against each transaction.
Inventory Drops backward compatibility!!!
improve ios callbacks. Fix xCode8 warnings
make receipt and orderId passing to Unity& Refatoring
store receipt and orderId to Inventory and send it to Unity for validation