in-app-purchase
in-app-purchase copied to clipboard
String receipts for Google Service Accounts not interpreted correctly in getService
When providing a string receipt with following elements:
{"packageName":"com.hehe","productId":"com.hehe.subscription","purchaseToken":"TOOOOKEN","subscription":true}
It wont properly understand it is google because of the below looks at the original string and not the parsed receipt:
The receipt.purchaseToken should be parsed.purchaseToken otherwise it will be set to Amazon.
@blaur Where did you find this code? I think I ran into this issue as well, but if I search for receipt.purchaseToken
in the codebase nothing turns up in the master or develop branches.
@0x80 You can find it here: https://github.com/voltrue2/in-app-purchase/blob/develop/index.js
On line 107 you can see that it says receipt.purchaseToken but it should be looking at the parsed token. I've highlighted it below.