Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InAppUtils.loadProducts alway return empty array and purchase got invalid_product #201

Closed
taeyzzz opened this issue Jan 10, 2019 · 4 comments

Comments

@taeyzzz
Copy link

taeyzzz commented Jan 10, 2019

Hi guys
these are my code to do in app purchase ios react native
it used to be work but right now it's not working anymore.
result after i loadProducts i alway got empty array
and then i call purchaseProduct alway got response 'invalid_product'

buyConsumePurchaseIOS(productId, amount){
var products = [
      'myapp.app.5credits',
      'myapp.app.10credits',
      'myapp.app.15credits',
    ];
    InAppUtils.loadProducts(products, (error, loadedProduct) => {
      console.log('error load product', error)
      console.log('available products', loadedProduct)
      if(error) return
      console.log(productId);
      InAppUtils.purchaseProduct('myapp.app.5credits', (error, response) => {
        console.log('res',response)
        console.log('ERROR', error)
        if(error){
          this.setState({
            showLoading: false
          })
          return
        }
        if(response && response.productIdentifier) {
          // Alert.alert('Purchase Successful', 'Your Transaction ID is ' + response.transactionIdentifier);
          // Alert.alert('Purchase Successful', 'Thank you for purchase ' + amount + ' credits');
          this.addCredit(amount)
        }
      });
    });
}

version

"react": "16.2.0",
"react-native": "0.55.4",
"react-native-in-app-utils": "^6.0.1",

xcode Version 10.1 (10B61)

Please help

Thank you

@taeyzzz
Copy link
Author

taeyzzz commented Jan 10, 2019

Sorry my bad

i forgot to accept new agreement in develop account

@taeyzzz taeyzzz closed this as completed Jan 10, 2019
@13arturbruno
Copy link

How to accept new agreement ?

@taeyzzz
Copy link
Author

taeyzzz commented Feb 19, 2019

@13arturbruno in apple develop account

@zxwGH
Copy link

zxwGH commented Dec 7, 2021

苹果开发帐户中的@13arturbruno

@13arturbruno in apple develop account

Do you need to set up tax?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants