Skip to content

Update README.md #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ var iap = new IAPChecker(/* secret */, /* production */);

checkReceipt(/* well formatted receipt */, function(err, valid, message, data){
if (!err) {
/* check that the product_id of the receipt matches the product_id of your In-App Purchase */
if ( data.receipt.product_id !== /* Your Product ID (String) */ ) {
/* do something if the user is using a fake receipt. */
}


/* do something if OK */
} else {
/* do something if there is an error */
Expand All @@ -44,6 +50,14 @@ checkReceipt(/* well formatted receipt */, function(err, valid, message, data){
Set the instance secret.


## Fake Purchases That Pass Validation

From [Hussain Fakhruddin's blog](http://blog.hussulinux.com/2013/04/apple-ios-in-app-purchase-hacking-how-to-prevent-specially-com-zeptolab-ctrbonus-superpower1-hacks/comment-page-1/#comment-33261):

Many jailbroken iOS devices just change the outgoing purchase receipt to an existing valid purchase receipt. (There are background apps to do this). Our server will then send this to Apple server for verification and guess what, apple will send a confirmation! A sheer good trick. But we’re smarter. Check if the product id is one of your products or not. If not, just cancel it out. The most famous spoofed product id is **com.zeptolab.ctrbonus.superpower1**. If you encounter any product ID apart from your own, then simply block them. They are not genuine at all!



## License

(The MIT License)
Expand All @@ -65,4 +79,4 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

#### v0.1.0

* first release
* first release