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

Cannot use any function in Iaphub. Logging Iaphub looks like so wrong #124

Closed lamlengend98 closed 1 year ago

lamlengend98 commented 1 year ago
import Iaphub from 'react-native-iaphub';

    console.log('Iaphub.Iaphub', Iaphub);
    Iaphub.start({
      // The app id is available on the settings page of your app
      appId: '',
      // The (client) api key is available on the settings page of your app
      apiKey: '',
      // Optional, ff you want to allow purchases when the user has an anonymous user id
      // If you're listenning to IAPHUB webhooks your implementation must support users with anonymous user ids
      // This option is disabled by default, when disabled the buy method will return an error when the user isn't logged in
      allowAnonymousPurchase: true,
      // -- OPTIONAL -- //
      // App environment (IAPHUB supports multiple environments, an environment act like a separate app and must be created on the IAPHUB dashboard)
      //environment: "staging"
    });

image

iaphub commented 1 year ago

Tested and we have no issue on our side. Looks like an issue on your side, seems like you cannot import correctly a esModule for some reason. What's your version of react-native-iaphub and Node.JS?