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

introductoryPrice missing and intriductoryPriceAsAmountIOS incorrect #2719

Open
LectricAvenue opened this issue Apr 3, 2024 · 0 comments
Open

Comments

@LectricAvenue
Copy link

Please use the Discussion board if you want to get some help. Please use issues to report bugs.

Description

  1. introductoryPrice seems to have been inadvertently removed from subscriptionSk2Map
  2. introductoryPriceAsAmountIOS is not an amount but rather a formatted price to display (e.g. '$49.99')

Expected Behavior

  1. introductoryPrice should be set to the formatted amount (e.g. "$49.99")
  2. intriductoryPriceAsAmountIOS should be a string representing only the value ("49.99")

The fix is below:

introductoryPrice: subscription?.introductoryOffer?.displayPrice,
introductoryPriceAsAmountIOS: String(subscription?.introductoryOffer?.price),

I don't know why introductoryPriceAsAmountIOS is a string, it seems a number would be better, but that is what is correct based on the TS Type SubscriptionIOS.

For now, I just use patch-package to fix this for myself

Environment:

  • react-native-iap: 12.13.0

To Reproduce

Call getSubscriptions using any valid SKU with a discounted introductory price (not a free trial) while using SK2.

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