and this code snippet was copied from react-native-in-app-utilsREADME.MD file
InAppUtils.purchaseProduct(productIdentifier, (error, response) => {
// NOTE for v3.0: User can cancel the payment which will be available as error object here.
if(response && response.productIdentifier) {
Alert.alert('Purchase Successful', 'Your Transaction ID is ' + response.transactionIdentifier);
//unlock store here.
}
});
so my question is:
can I change the logic from if (purchaseError) to if(!(response && response.productIdentifier))
Hi, everyone: this code snippet was copied from my project.
and this code snippet was copied from
react-native-in-app-utils
README.MD fileso my question is:
if (purchaseError)
toif(!(response && response.productIdentifier))