How to check if the receipt is valid
Closed this issue · 2 comments
sambauwens commented
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?
ronkorving commented
Indeed. If you get a positive response object (instead of an error), the receipt can be considered valid.
sambauwens commented
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.