How can I validate the consumable IAP ? Is it a correct way to validate the consumable product ?
this.purchaseUpdateSubscription = purchaseUpdatedListener((purchase: ProductPurchase ) => {
const receipt = purchase.transactionReceipt;
if (receipt) {
const receiptBody = {
'receipt-data': purchase.transactionReceipt,
'password': '************'
};
RNIap.validateReceiptIos(receiptBody, false)
.then((deliveryResult) => {
if (deliveryResult) {
//required stuff...
}
}
}