iaphub / react-native-iaphub

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

Price missing on Android #113

Closed SqueezedLight closed 2 years ago

SqueezedLight commented 2 years ago

Hi guys, i have some troubles with the Android integration. On iOS everything works as expected (sanbox tested). It seems with

const productsForSale = await Iaphub.getProductsForSale();

the price property is null on Android. localizedPrice ist set correctly. I'm on version 7.0.6.

The products are "In-app products" in the google play store. In the product settings of IAPhub i created them as consumables.

Any help appreciated, thanks!

iaphub commented 2 years ago

Hi @SqueezedLight,

Hmmm weird 🤔 we do not have any issues on our side, hard to tell what's different in your app. You said localizedPrice is or isn't returned correctly?

SqueezedLight commented 2 years ago

Hi @iaphub yes localizedPrice is returned correctly. I played around a little with product types in the IAPHub interface, but no luck. This is how a product object returned by getProductsForSale() look like:

{
  "currency": "EUR",
  "group": "62a2602c2296684bb872793a",
  "groupName": "PremiumMemberships",
  "id": "62a18f212296684bb86f4d9e",
  "localizedDescription": "Here my description",
  "localizedPrice": "94,99 €",
  "localizedTitle": "Here my title",
  "price": null,
  "sku": "com.product.premium.12months",
  "subscriptionDuration": "",
  "subscriptionIntroCycles": 0,
  "subscriptionIntroDuration": "",
  "subscriptionIntroLocalizedPrice": "",
  "subscriptionIntroPayment": null,
  "subscriptionIntroPrice": null,
  "subscriptionPeriodType": null,
  "subscriptionTrialDuration": "",
  "type": "non_consumable"
}

Again - everything works with iOS. Thanks for you help!

iaphub commented 2 years ago

It should be fixed in the latest version 7.0.7 🙂

iaphub commented 2 years ago

We forgot something causing the issue, it has been fixed in 7.0.8