Giter Club home page Giter Club logo

Comments (10)

joshuapinter avatar joshuapinter commented on June 29, 2024 1

Fair enough man. Well, with the additional README hints, this should help clear things up for others. πŸ‘

from react-native-in-app-utils.

chirag04 avatar chirag04 commented on June 29, 2024

that's just how apple designed their sdk. I don't know if we can do anything here.

from react-native-in-app-utils.

joshuapinter avatar joshuapinter commented on June 29, 2024

@chirag04 Not really, though, right? Can't we just remove that cache you've created involving the products variable and just call the purchase method with the specified product identifier?

Why do we need to load the products as a requirement for purchasing a product?

from react-native-in-app-utils.

chirag04 avatar chirag04 commented on June 29, 2024

unless i'm mistaken there is no api for purchasing a product directly with a product identifier. you need to make a request to load it first.

loading product first can be useful in cases where you want to show the product price in local currency first.

from react-native-in-app-utils.

joshuapinter avatar joshuapinter commented on June 29, 2024

Okay, I gotcha! Thanks again for all your help and creating this library. I'm well on my way now. :)

from react-native-in-app-utils.

joshuapinter avatar joshuapinter commented on June 29, 2024

Just as a final thought, you could trigger a load of the products when somebody calls the purchaseProduct and just use the product identifier that they supplied.

from react-native-in-app-utils.

chirag04 avatar chirag04 commented on June 29, 2024

i would rather prefer that to be in the userland. if users want to load products automatically, they just write a wrapper function on top of purchase product that does it for them.

from react-native-in-app-utils.

dwilt avatar dwilt commented on June 29, 2024

To @joshuapinter 's point, here's what we're doing:

export async function purchase(identifier) {
    await loadProducts(identifier);
    return purchaseProduct(identifier);
}

from react-native-in-app-utils.

chirag04 avatar chirag04 commented on June 29, 2024

Be careful to check for loadProduct failures.

from react-native-in-app-utils.

wilbyang avatar wilbyang commented on June 29, 2024

I have created a product with type being 'Non-consumable' and status 'Waiting for review'. I am trying to load the product, with the right indentifier, but the repsonse contains no products and just something like _invalidindentifers staff (get it from debugging windows). Does I mis-understanding some staff. I have been in this trap/trouble for one week.

from react-native-in-app-utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.