Closed tirrorex closed 6 years ago
Pretty straightforward code :
getPurchasedProducts(products) { return new Promise(function (resolve, reject) { InAppUtils.restorePurchases((error, response) => { if (error !== undefined) { console.warn("error restore"); reject(error); } else if (response.length === 0) { console.warn("no products to restore"); resolve(products); } else { console.warn("restoring purchases"); response.forEach((purchase) => { const product = products.find((product) => product.id === purchase.identifier); if (product !== undefined) { product.purchased = true; } }); resolve(products); } }); }); }
Got error restore on sandbox even though i just purchased the product (didn't reload the app), this is non-consumable IAP so i shouldn't have any issue. Any idea on how to debug this ?
ok so i did some checking, there is indeed a response with the purchase but also an error who is set. Weird, did i miss something ?
Ok so the error passed is null but not undefined. My bad
Pretty straightforward code :
Got error restore on sandbox even though i just purchased the product (didn't reload the app), this is non-consumable IAP so i shouldn't have any issue. Any idea on how to debug this ?