-
-
Notifications
You must be signed in to change notification settings - Fork 734
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 - finalizing authorization sheet and thank you toast presentation #4641
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mazevedofs
approved these changes
Oct 3, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working great!
This was referenced May 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Dependent PR
PR is dependent on another PR - merge dependent PR first and update branch before merging
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Phabricator:
https://phabricator.wikimedia.org/T345852
https://phabricator.wikimedia.org/T288285
Notes
This PR represents the last pieces needed to get the Donate form to display the payment sheet and thank you toast once the
submitPayment
call succeeds. I expect smaller followup PRs will be needed once the endpoints are finalized.This PR is dependent on #4619.
Test Steps
Prep work: On a test device, log out of your iCloud account in device settings, and log into a sandbox testing account (see iOS Sandbox Tester details in 1Password). Do not enable 2-factor if prompted. Once logged into sandbox account, go to the Apple Wallet app and add a sandbox testing card. (I have had luck with the top Discover one).
To test Xcode Cloud script injection:
To test locally:
From repo root directory, run this command in terminal:
./scripts/copy_staging_environment_vars.sh "{merchantID}" "ABCDPaymentAPIKeyEFGH"
replacing {merchantID} with our test merchant ID. Reach out to me if you need help finding this. This payment API key is fake, but we aren't using it in the endpoint calls yet so this is just to confirm it gets copied to the Info.plist file properly.After running, confirm you see a change in
Staging-Info.plist
(added MerchantID and PaymentsAPIKey) andWikipedia.entitlements
(added merchant ID tocom.apple.developer.in-app-payments
key) in git.Launch app. Background, foreground, and pull to refresh Explore feed to trigger config fetches.
Go through the form and tap the Apple Pay button. Confirm you now see a payment authorization sheet. Confirm you are prompted to enter billing address, name, and email details if needed, and can complete a payment.
Confirm after completing payment, you are taken back to the Settings root and see a thank you toast.
Note: Just an FYI. For the Staging app, we are mocking the donate endpoint calls, thanks to a temporary commit in the first PR. This mocking commit is reverted in the next PR (#4645)