I am using react-native-iap V8.1.1 and react-native V0.65.1 After calling requestSubscription method The log will be like "iap data: true" but as it is explained in the react-native-iap documentation I should recieve my data as a SubscriptionPurchase object.
Here is my code:
RNIap.requestSubscription({ sku: chosen }).then((data) => {
console.log('iap data:', data);
user.upgradeUser({
productId: data.productId,
purchaseToken: Platform.select({ ios: data.transactionReceipt, android: data.purchaseToken }),
}).then(() => {
setloading(false);
RNIap.finishTransaction(data, false);
navigation.navigate('PlusCeleb');
}).catch(() => {
setloading(false);
});
}).catch((err) => {
setloading(false);
console.log('iap err', err);
Message(
err.message,
'warning',
);
});
this issue was fixed in version 12.3.2 update your library