Page MenuHomePhabricator

Design Donation flow for GPay
Closed, ResolvedPublic

Assigned To
Authored By
HNordeenWMF
Apr 16 2024, 4:45 PM
Referenced Files
F49464152: screenshot_20240430-100650_720.png
Apr 30 2024, 2:16 PM
F49463530: image.png
Apr 30 2024, 2:16 PM
F49337601: Screenshot_20240429_132930.png
Apr 29 2024, 9:27 PM
F48311106: Export for Phab.png
Apr 23 2024, 5:32 PM
F48310831: android-article entry.png
Apr 23 2024, 5:32 PM
F48310802: android-settings entry.png
Apr 23 2024, 5:32 PM

Description

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 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 donate.wikimedia.org)
    • Error message for when an amount is above $25,000 USD (Match 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 branded button from Google
    • Links below the donation form should be:
  • 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 (Figma)

Below are the final mockups of the "Donate with Google Pay" flow that can be found in this 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

android-settings entry.png (800×360 px, 46 KB)

  • 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

android-article entry.png (720×360 px, 67 KB)

In-app donation flow

Export for Phab.png (768×3 px, 538 KB)

[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 Figma
References:
To do:
  • AV Create rough mockups and share for feedback in April 18 Combined Apps
  • DB Share mockups with Google
  • AV Create final mockups and attach to Sub Epic

Event Timeline

Design update

Final mockups have been attached to the Sub Epic

Dbrant added a subscriber: aishwaryavardhana.

As discussed, repurposing this task as the engineering task. (thx so much @aishwaryavardhana)

An APK is now available for testing:
https://github.com/wikimedia/apps-android-wikipedia/actions/runs/8850286281

A few notes for testing and evaluation:

  • There is a new Developer Preference, all the way at the bottom, to enable "Donation testing environment", which you should do for testing the actual payment submission. (It's not necessary for testing everything else leading up to the final submission)
  • Testing an actual, live donation from a real credit card is only possible through the Beta or Production builds of the app. (to be tested separately from this ticket)
  • Some of the Fundraising-Tech APIs are rate-limited, so take care to test the interface sparingly for now.

most current apk:
https://github.com/wikimedia/apps-android-wikipedia/actions/runs/8883906033/artifacts/1457903558

Just tested (successfully) making a donation with Japanese Yen 🎉

Screenshot_20240429_132930.png (2×1 px, 182 KB)

Note that certain UI elements might not match designs exactly, due to requirements/constraints of Material guidelines, e.g.:

  • The title at the top of the screen is aligned left, not center, for consistency with the rest of the app.
  • The currency symbol is aligned to the left of the text field, since this is how the Material textview component implements it by default.
  • There is no thin divider between checkboxes, since this is not the pattern in other lists of checkboxes throughout the app.

@Dbrant this is looking good! A few small notes:

  • When I select "I'll generously add $0.35 to cover the transaction fees..." that amount is not added to the total in the input field
  • I am not seeing the checkbox for "yes, the Wikimedia Foundation can send me an occasional email" either logged in or logged out
  • The payment confirmation is a bit different than in the Figma (seems like this is just the native flow and is probably preferred, but just wanted to check in case the screen in Figma was intended to be a confirmation screen):
Payment screen in FigmaPayment screen in Beta app
image.png (768×360 px, 37 KB)
screenshot_20240430-100650_720.png (719×332 px, 35 KB)
  • When I select "I'll generously add $0.35 to cover the transaction fees..." that amount is not added to the total in the input field

Will do! (Under the current logic it will add the $0.35 under the hood when submitting the final amount, but totally agree that the text field itself should be the source of truth for the final amount)

  • I am not seeing the checkbox for "yes, the Wikimedia Foundation can send me an occasional email" either logged in or logged out

For certain countries (including US) we do not require explicit consent to send communications. This checkbox only appears in countries where it needs to be explicitly checked.

  • The payment confirmation is a bit different than in the Figma (seems like this is just the native flow and is probably preferred, but just wanted to check in case the screen in Figma was intended to be a confirmation screen):

This is where we hand it off to the built-in Google Pay screen, which we don't have control over. (see comment in Figma)

@Dbrant thanks for following up with these! All of the above sounds good to me. Let me know when you change the logic re transaction fees and I can do a review again.

Hi @Dbrant unfortunately the link above isn't working for me

Hi @Dbrant unfortunately the link above isn't working for me

doh, here is a link that actually works:
https://drive.google.com/file/d/1sBJ-6SrBApe6H8NBiMSBJwmAhp-10R9V/view?usp=sharing

Sorry for the delay, looking good to me! Thanks for the update!