Wizcorp/node-iap

How to check if the receipt is valid

Closed this issue · 2 comments

This node package looks great and I think I will use it, however the documenation doesn't specify how we know whether the receipt is valid or not (i.e there is no isValid or the likes of it in the response). Should I just check whether error is null to know if the receipt is valid?

Indeed. If you get a positive response object (instead of an error), the receipt can be considered valid.

Ok, I just noticed in the code that the status value is inluded in the error object, so I can use that to differentiate errors.