in-app-purchase icon indicating copy to clipboard operation
in-app-purchase copied to clipboard

String receipts for Google Service Accounts not interpreted correctly in getService

Open blaur opened this issue 5 years ago • 2 comments

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: image

The receipt.purchaseToken should be parsed.purchaseToken otherwise it will be set to Amazon.

blaur avatar Feb 20 '20 13:02 blaur

@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 avatar Mar 19 '20 10:03 0x80

@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.

image

blaur avatar Mar 19 '20 10:03 blaur