iaphub / react-native-iaphub

The easiest way to implement IAP (In-app purchase) in your React Native app.
https://www.iaphub.com/
MIT License
319 stars 21 forks source link

Iaphub.getProductsForSale() doesn't return subscriptions #88

Closed armin23615 closed 3 years ago

armin23615 commented 3 years ago

I have a few non-renewable subscriptions on Google play console: image

And I have one In-app product: image

And this is the response I get from getProductsForSale():

 [{"description": "Enter a new team ", 
  "id": "60ed63576b49861697f3a726",
  "price": "$8.31",
  "priceAmount": 8.31, 
  "priceCurrency": "USD", 
  "sku": "enter_new_team_", 
  "title": "Enter a new team  (com.dartsorakelfantasy (unreviewed))", "type": "consumable"}]

Also for every subscription I get: " GooglePlay did not return the product 'player_and_events_12months', the product has been filtered, if the sku is valid your GooglePlay account or sandbox environment is probably not configured properly (https://iaphub.com/docs/set-up-android/configure-sandbox-testing)"

How to get those subscriptions too? I'm not sure what isn't configured correctly because I'm getting that one product.

These are my Iaphub products. image

armin23615 commented 3 years ago

However if I change subscription type to auto-renewable, it is returned in products array.

iaphub commented 3 years ago

Hi @armin23615,

If you're looking to sell non-renewable subscriptions on Android, you must create an 'In-app product', subscriptions on the Google Play Store are auto-renewable.

This is the cause of your issue, you could also edit your product type on IAPHUB to 'renewable subscription' and it should work (but it's gonna be an auto renewable subscription).