mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 23:42:12 +00:00
parse receipt object
This commit is contained in:
parent
e19657b8ac
commit
f8760a337a
1 changed files with 3 additions and 2 deletions
|
|
@ -35,8 +35,9 @@ async function iapAndroidVerify (user, iapBody) {
|
|||
googleRes = await iapValidate(iap.GOOGLE, testObj);
|
||||
|
||||
if (iap.isValidated(googleRes)) {
|
||||
console.log('test obj', JSON.stringify(testObj));
|
||||
token = testObj.data.token || testObj.data.purchaseToken;
|
||||
let receiptObj = JSON.parse(testObj.data);
|
||||
console.log(receiptObj);
|
||||
token = receiptObj.token || receiptObj.purchaseToken;
|
||||
|
||||
let existingReceipt = await IapPurchaseReceipt.findOne({
|
||||
_id: token,
|
||||
|
|
|
|||
Loading…
Reference in a new issue