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

Expose offerPrice, offerDuration and hasOfferPrice properties #155

Open
Geoffrey63 opened this issue Oct 8, 2024 · 0 comments
Open

Expose offerPrice, offerDuration and hasOfferPrice properties #155

Geoffrey63 opened this issue Oct 8, 2024 · 0 comments

Comments

@Geoffrey63
Copy link

Hello,

In a confirmation modal, we'd like to display a summary of the purchase before confirmation.
Our yearly plan has an offer and we can display it on iOS like so :

    if (selectedPlan.hasIntroductoryPrice) {
      return `${selectedPlan.introPrice} pour ${selectedPlan.introDuration} puis ${selectedPlan.price}`;
    }

selectedPlan is a PurchaselyPlan

On Android we'd like to do the same thing :

    if (selectedPlan.hasOfferPrice) {
      return `${selectedPlan.offerPrice} pour ${selectedPlan.offerDuration} puis ${selectedPlan.price}`;
    }

but properties hasOfferPrice, offerPrice and offerDuration do not exist on PurchaselyPlan type.

Is this the right way to retrieve the promotional offer?
If so, can you modify the PurchaselyPlan type to add these properties ?

Thank you.

@Geoffrey63 Geoffrey63 changed the title Expose offerPrice, offerDuration and hasOfferPrice fields Expose offerPrice, offerDuration and hasOfferPrice properties Oct 9, 2024
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

1 participant