react-native-in-app-utils: It won't purchase... ever. Help please!

Hello everybody,

Here is my issue. I’ve done this:

var products = [
   'com.xyz.abc',
];
InAppUtils.loadProducts(products, (error, products) => {
   //update store here.
});

and also this:

var productIdentifier = 'com.xyz.abc';
InAppUtils.purchaseProduct(productIdentifier, (error, response) => {
   // NOTE for v3.0: User can cancel the payment which will be availble as error object here.
   if(response && response.productIdentifier) {
      AlertIOS.alert('Purchase Successful', 'Your Transaction ID is ' + response.transactionIdentifier);
      //unlock store here.
   }
});

The thing is that everything seems to go well but it never enters the piece of code where the store has to be unlocked.

When I tap on the icon of the inAPP purchase product, it opens the dialog to buy it. If I buy it, it does nothing. Not even an alert. It’s like InAppUtils.purchaseProduct now would be working differently. It never callsback. All the management lays on the purchaseProduct method and it says the product has been purchased but not with the alert or alerts I’m trying to use.

Can anyone help? Thanks in advance!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 31 (14 by maintainers)

Most upvoted comments

Dang. It actually has been working for us until now. I have a hunch that its because this is a case where the subscription already existed, was canceled, and then repurchased during the remaining pay period. Will investigate further and see if we can figure it out.

@kawashimaken I have the exact same thing as you.

My code was working with the sandbox a few days ago but yesterday this started happening.

The first version of my app is in App Store review, so we’ll see what happens.