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

[Apple Pay] Hide Apple Pay for unsupported project countries #829

Merged
merged 4 commits into from
Sep 10, 2019

Conversation

ifbarrera
Copy link
Contributor

@ifbarrera ifbarrera commented Sep 5, 2019

📲 What

Apple Pay is only supported a subset of countries that Kickstarter has launched in, so we should hide the Apple Pay button if the project is in a country that is not supported.

🤔 Why

Apple Pay.

🛠 How

Apple Pay is only supported in a subset of countries that Kickstarter has launched in. We get this list of countries from the /config endpoint. In addition to checking whether the user's device has the Apple Pay capability, as also determine whether Kickstarter supports Apple Pay in the project's country.

✅ Acceptance criteria

With the Native Checkout and Native Pledge Screen feature flags turned ON

  • Run the app on a device that has Apple Pay set up. Navigate to a project in the US. You should see the Apple Pay button on the new pledge screen.
  • Run the app on a device that has Apple Pay set up. Navigate to a project in Mexico (not supported). You should not see the Apple Pay button on the new pledge screen.

Copy link
Contributor

@Scollaco Scollaco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job, @ifbarrera ! I just left a couple comments/suggestions

Library/ViewModels/PledgePaymentMethodsViewModel.swift Outdated Show resolved Hide resolved
@ifbarrera ifbarrera requested a review from Scollaco September 10, 2019 14:29
@ifbarrera ifbarrera merged commit 7fc0b03 into master Sep 10, 2019
@ifbarrera ifbarrera deleted the apple-pay-launched-countries branch September 10, 2019 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants