#### Background
This is the task to add native support for GPay into the Android Wikipedia App in partnership with fr-tech. Adding Native payment method support was one of the proposed enhancements identified for improving donor experience in the apps. Fr-tech and the iOS team have already added support for ApplePay. Adding support for Google / Apple Pay was also a [[ https://meta.wikimedia.org/wiki/Community_Wishlist_Survey_2022/Mobile_and_apps#Accepting_donations_from_mobile_apps | request in the 2022 Wishlist ]].
#### Requirements
- Entry points for flow: 1) From the "Donate" option in settings 2) from an in-app banner
- An option to "Donate with GPay" or via "Other payment method" should be presented when tapping Donate
- The GooglePay option or any branding should not be visible if the user doesn't have GooglePay set-up or is restricted for compliance reasons. In this case, the user should be sent directly to donate.wikimedia.org
- Tapping "Donate with GPay" should launch the Native Donation form
- The Native Donation form should have **functional parity with iOS's native donation form**
- Array of amounts
- Cursor should be **not** be active on Amount entry initially
- Choosing an amount button autofills that amount into the amount field.
- Error message for when an amount is below the minimum accepted donation amount (Match [[ https://donate.wikimedia.org/w/index.php?title=Special:LandingPage&country=US&uselang=en&utm_medium=spontaneous&utm_source=fr-redir&utm_campaign=spontaneous | donate.wikimedia.org ]])
- Error message for when an amount is above $25,000 USD (Match [[ https://donate.wikimedia.org/w/index.php?title=Special:LandingPage&country=US&uselang=en&utm_medium=spontaneous&utm_source=fr-redir&utm_campaign=spontaneous | donate.wikimedia.org ]])
- Checkbox for transaction fee //I'll generously add X to cover the transaction fees so you can keep 100% of my donation.//
- Choosing to pay transaction fees automatically adds that amount into the amount field
- Checkbox for recurring donation //Make this a monthly recurring donation.//
- Checkbox for email opt-in //Yes, the Wikimedia Foundation may send me an occasional email.//
- "Donate with GPay" button should use pre-packaged [[ https://developers.google.com/pay/api/android/guides/brand-guidelines | branded button from Google ]]
- Links below the donation form should be:
- [[ https://donate.wikimedia.org/wiki/Problems_donating | Problems donating? ]]
- [[ https://donate.wikimedia.org/wiki/Ways_to_Give | Other ways to give ]]
- [[ https://donate.wikimedia.org/wiki/FAQ | Frequently asked questions ]]
- [[ https://donate.wikimedia.org/wiki/Tax_deductibility | Tax deductibility information]]
- After donating via GPay, show a Thank you message in-app (on article or screen that they started on before clicking into Settings or on the banner)
- Tapping "Other payment method" should launch the existing link used in the app to donate.wikimedia.org
#### Designs ([[ https://www.figma.com/file/yapMJ6cGCJpYWhLmnSYScJ/iOS-and-Android-%E2%86%92-Donor-experiences?type=design&node-id=1248%3A532&mode=design&t=SP6Wbi18S91zeVxM-1 | Figma ]])
Below are the final mockups of the "Donate with Google Pay" flow that can be found in this [[ https://www.figma.com/file/yapMJ6cGCJpYWhLmnSYScJ/iOS-and-Android-%E2%86%92-Donor-experiences?type=design&node-id=1248%3A532&mode=design&t=SP6Wbi18S91zeVxM-1 | Figma ]] file.
Contributors can access the "Donate with Google Pay" action through Settings menu in the bottom right navigation bar and through article banners.
====Settings entry point
{F48310802}
- If the user donates from the Settings menu, once they finish their donation return them to the page they were on, with “thank you” toast displayed.
====Article banner
{F48310831}
====In-app donation flow
{F48311106}
[click image to see full screen]
- Once the user clicks "Donate now" in the article banner they are navigated to the in-app donation flow
- If they choose "Other payment" they are navigated to the existing donation experience on mobile web
- Details of the spec are in [[ https://www.figma.com/file/yapMJ6cGCJpYWhLmnSYScJ/iOS-and-Android-%E2%86%92-Donor-experiences?type=design&node-id=1248%3A532&mode=design&t=SP6Wbi18S91zeVxM-1 | Figma ]]
####References:
* Brand guidelines from Google https://developers.google.com/pay/api/android/guides/brand-guidelines
* Can be based on ApplePay general flow (ApplePay Parent task with designs: T288285, [[ https://www.figma.com/file/yapMJ6cGCJpYWhLmnSYScJ/iOS-and-Android-%E2%86%92-Donor-experiences?type=design&node-id=0-1&mode=design | figma ]])
* Also consider existing Android Banner/Donation flow designs: [[ https://www.figma.com/file/yapMJ6cGCJpYWhLmnSYScJ/iOS-and-Android-%E2%86%92-Donor-experiences?type=design&node-id=783-7192&mode=design&t=Ahuq484AFuCq4l4t-0 | Figma ]]
####To do:
[x] AV Create rough mockups and share for feedback in April 18 Combined Apps
[x] DB Share mockups with Google
[x] AV Create final mockups and attach to Sub Epic