Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Feature/ios tune up #118

Merged
merged 10 commits into from Jan 11, 2017
Merged

Feature/ios tune up #118

merged 10 commits into from Jan 11, 2017

Conversation

Dukobpa3
Copy link

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

[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
break;
}
}
}

- (NSString*)convertTransactionToJson: (SKPaymentTransaction*) transaction storeToUserDefaults:(bool)store
{
//NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
Copy link
Author

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];
Copy link
Author

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.

@Dukobpa3 Dukobpa3 mentioned this pull request Dec 26, 2016
@akarimova akarimova merged commit 19b1719 into onepf:master Jan 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants