Page MenuHomePhabricator

As a donor I want to be able to make an easy and convenient donation via Apple Pay in the Wikipedia app
Closed, ResolvedPublic

Assigned To
None
Authored By
LGoto
Aug 5 2021, 7:06 PM
Referenced Files
F37817687: ios-apple-pay-15.png
Sep 27 2023, 4:53 PM
F37817685: ios-apple-pay-14.png
Sep 27 2023, 4:53 PM
F37817683: ios-apple-pay-13.png
Sep 27 2023, 4:53 PM
F37817681: ios-apple-pay-12.png
Sep 27 2023, 4:53 PM
F37817679: ios-apple-pay-11.png
Sep 27 2023, 4:53 PM
F37817677: ios-apple-pay-10.png
Sep 27 2023, 4:53 PM
F37750169: ios-apple-pay-06b.png
Sep 22 2023, 11:01 AM
F37750167: ios-apple-pay-06b.png
Sep 22 2023, 11:01 AM

Description

Must-haves
  • Settings item near the top with "Donate" option
  • An option to pay via Apple Pay should be presented when tapping this
  • Tapping "Donate with Apple Pay" should launch the iOS Payment Authorization view controller/action sheet
  • The Apple Pay option or any branding should not be visible if the user doesn't have Apple Pay or is restricted for compliance reasons.
  • Tapping "Other payment method" should launch the existing link used in the app into the donate.wikimedia.org
Technical notes
  • The donation flow should be presentable from any context.
  • For now, we don't need to keep track of successful donations or keep any local information about donation history. In the future, we may want to record a donation that has occurred to prevent additional asks from being shown, but for this version, no record of donation is required.
  • This feature must work well with Dynamic Type and Voice Over.
Open questions
Designs (Figma)

Below are variants of the "Donate with Apple Pay" mocks that can be found in this Figma file.

Contributors can access the "Donate with Apple Pay" action through Settings in the Explore tab’s top right corner.

Settings entry point
1. Settings entry
ios-apple-pay-01.png (1×750 px, 467 KB)
2. Donate item
ios-apple-pay-02.png (1×750 px, 149 KB)
3. Donate sheet
ios-apple-pay-03.png (1×754 px, 121 KB)
4. Success toast
ios-apple-pay-04.png (1×750 px, 150 KB)
Article entry point
Banner design
ios-apple-pay-06b.png (1×786 px, 170 KB)
Reminder toast
ios-apple-pay-21.png (1×786 px, 739 KB)
Already donated toast
ios-apple-pay-22.png (1×786 px, 720 KB)
  • "Donate now" takes users to a native (Variant A) or in-app web form (Variant B). Which one will be decided based on technical feasibility within the project’s timeline.
  • After a successful donation, the banner is not shown again for the rest of the campaign.
  • "Maybe later"
    • Shows the banner again the next day.
    • "Maybe later" is not shown when the %currentTime plus %maybeLaterTime equals the campaign's end date.
  • The “Close” (top right x) and “I already donated” options both dismiss the banner for the rest of the campaign. Already donated shows a brief "Thank you" toast (see third image)

Variant A: Native form

1. Donate sheet
ios-apple-pay-09.png (1×786 px, 645 KB)
2. Native form
ios-apple-pay-10.png (1×750 px, 75 KB)
3. Error
ios-apple-pay-11.png (1×750 px, 81 KB)
4. Selection
ios-apple-pay-12.png (1×750 px, 77 KB)
5. Pay the fee
ios-apple-pay-13.png (1×750 px, 77 KB)
6. Email
ios-apple-pay-14.png (1×750 px, 78 KB)
7. Donate CTA
ios-apple-pay-15.png (1×750 px, 177 KB)
8. Success toast
ios-apple-pay-16.png (1×786 px, 735 KB)
  • "Donate now" takes users to a native payment form. This is the recommended variant.
  • Donate sheet
    • Shown when users are "ready to pay" with Apple Pay on their device.
    • If Apple Pay has not been set up on a user’s device before, they’re taken directly to the in-app web form (see Variant B) after tapping "Donate now (Donate sheet is not shown).
    • Choosing "Other payment method" takes users to the in-app web form (see Variant B)
    • Note: We’re showing the action sheet with the options since it’s technically challenging/unclear if amounts from the native can be passed on the web form.
  • Links below "Donate with Apple Pay"

Variant B: In-app web form

1. Banner
ios-apple-pay-06b.png (1×786 px, 170 KB)
2. Web form
ios-apple-pay-17.png (1×786 px, 265 KB)
3. Details
ios-apple-pay-18.png (1×786 px, 67 KB)
4. Recurring
ios-apple-pay-19.png (1×786 px, 120 KB)
5. Thank you
ios-apple-pay-20.png (1×786 px, 340 KB)
  • "Donate now" takes users to a web form.
  • Note: If available on the device, the web form also features an "Apple Pay option.
  • The "Thank you" page features a prominent button at the bottom to take users back to the article.

Testing Notes

This can be tested starting in Wikipedia TestFlight 7.4.3 (2809) build.

Testing tips:
All new donor experience work (in-app web view, new campaign modals with maybe later, multilingual campaign support, Apple Pay native donation) are set up to become available in the app only once the Netherlands or Italy Oct/Nov 2023 campaigns become valid. To test native Apple Pay, your device needs to be set up like this:

  1. Device iOS Settings > Language & Region > Region needs to be set to either the Netherlands or Italy
  2. Device date & time needs to be set on or after the campaign start date (change device date to 10/17)
  3. After fresh install, you must background and foreground the app, then pull to refresh on the Explore feed to trigger a force refresh of the campaign data.
  4. To be provided the option to donate via Apple Pay (native donate form), you must have a valid card set up in Apple Wallet.
  5. IMPORTANT: Production charges are rate-limited to 4 transactions per 4 hours.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
spatton renamed this task from As a donor I want to be able to make an easy and conveient donation via Apple Pay in the Wikipedia app to As a donor I want to be able to make an easy and convenient donation via Apple Pay in the Wikipedia app.Jul 25 2022, 2:24 PM
Tsevener updated the task description. (Show Details)

@OTichonova I have a couple of UI questions:

1

We have an applelogo SFSymbol that I'm able to use for the Settings screen, but it comes with this warning in the SFSymbol's app that has me concerned:

Screen Shot 2022-08-02 at 11.24.18 AM.png (143×374 px, 18 KB)

Maybe we should use something else for this?

2

It looks like FR-tech's banners currency conversion reference has a "minimum" section:

frb.amounts.minimums = {
    'USD' : 1,
    'CAD' : 1.24,
    'AUD' : 1.34,
    'NZD' : 1.40,
    'GBP' : 0.73,
    'EUR' : 0.86,
    'DKK' : 6.40,
    'HUF' : 314,
    'ILS' : 3.20,
    'INR' : 10, // T309818
    'JPY' : 114,
    'MYR' : 4.15,
    'NOK' : 8.35,
    'PLN' : 3.96,
    'RON' : 4.25,
    'SEK' : 8.59,
    'UAH' : 26,
    'ZAR' : 15,
    // Latin America
    'BRL' : 5.61,
    'ARS' : 99,
    'CLP' : 812,
    'COP' : 3762,
    'MXN' : 20,
    'PEN' : 3.63,
    'UYU' : 43,
    'CHF' : 1
};

And web seems to use it too:

IMG_FFB718B68489-1.jpeg (2×1 px, 579 KB)

I think we should add a validation error like this as part of the design.

Hi @Tsevener

  1. I changed the icon for this giftcard icon for now. I'll double-check with other designers if this icon is appropriate but I don't think we should stick with the apple logo.

Settings.png (812×375 px, 64 KB)

  1. I think the validation error text is great. We should use the text/values found on web.

Payment sheet.png (812×375 px, 35 KB)

@greg @TSkaff @dkozlowski Note to Greg, Dylan and Thea that the App team will need dev support to get Apple Pay live in the App. Can we get this in the priority queue when Olga gets to that point? @OTichonova Hi Olga, these are the folks than can prioritize what you need from Fundraising Tech to deploy.

Had a meeting with @Ejegg just now, here's a recap:

  • FR-tech will need to rework the web's payment certificate to use the less-quick setup (see documentation), due to this callout:

The option to use Adyen's Apple Pay certificate is only available on web. If you have a native mobile integration, you need to use your own Apple Pay certificate.

  • The plan for now is for iOS to lean on the Adyen iOS Components SDK and follow their setup doc. We'll need two new endpoints from FR-tech for this. The iOS app will need to send an Adyen clientKey to both of these endpoints:
    1. One endpoint that returns an order number, as well as makes the /paymentMethods call to Adyen and gives us those results.
    2. One endpoint that takes in the apple payment token and donor contact information (contact name & email) and submits to Adyen's /payments endpoint and CiviCRM, respectively.
  • Some confusion on both sides about what the countryCode should be...Adyen's /payments documentation for the Apple Pay web component says "The two-letter country code of your merchant account.", but their API explorer for the same endpoint says "The shopper country." Apple docs for basic PKPaymentRequests suggests the it's merchant country code. I have asked about this in an Adyen support ticket but haven't heard back.
  • The amount of work on FR-tech side for all of this is not trivial, so it's doubtful FR-tech will get to this work soon given their current high priorities.
  • Since this may be a hefty chunk of work, we briefly discussed looping in Android to be sure the new endpoints will work with Google Pay.

Given the last two points, I'm going to pause on my side until we know more.

Just some notes for future technical, product and designs conversations on this iOS flow and possibly transferrable for any future android flow:

We need to

  • be able to enter a flow from an announcement

We may want to

  • be able to enter a flow from an announcement
  • include the form as part of a modal alongside announcement text
  • have the form be in a modal but the next step after the presentation of the announcement text
  • support multiple currencies for the askstring amounts based on country and language
  • support multiple payment methods
  • support apple pay and other payments via paymentswiki via the same flow
  • support monthly payments
  • limit option amount to 2 decimal places
  • consider donate.wikimedia.org, the MobileApps extension or meta.wikimedia.org to store some configuration (example)
  • consider making the tick boxes bigger
  • consider the use of buttons in place of tick box (particularly for communication opt-in)
  • support minimum amount validation
  • noting the average amount donation
jgleeson added a subscriber: Tsevener.

hmm maybe this isn't a task we want to claim and instead we want to follow?

JTannerWMF added a subscriber: scblr.

@scblr and @OTichonova are going to refresh the designs on this task to match the API Calls so I am putting this in the design column on the iOS board. Please also consider our Slack conversation in the designs.

Updated the description with this additional step @Tsevener @JTannerWMF @OTichonova

{F37621513}

I did not update the designs with preselection per @Pcoombe’s comment on Slack for now:

We usually find that not prefilling anything and leaving it up to the user is best

It’d be interesting to test its effect on donations if we preselect (future A/B test?)

I updated the task as we discussed last Wednesday @JTannerWMF.

Notes:

  • I consolidated the previously discussed variants: "Apple Pay takes users to donatewiki" and "Wrap in Web view completely" in Variant B (see task description). Reasons:
    • We can’t take users to the checkout flow without an amount.
    • The in-app web version does feature Apple Pay when available on the user’s device (see this screenshot).
  • Please take a look at the proposed banner variants on Figma based @Dmantena’s comments. It’ll be important for @Tsevener to know which one we’ll move forward with.
Tsevener updated the task description. (Show Details)
ABorbaWMF subscribed.

Looks good to me. I was able to make multiple donations and step through the flow (including Apply Pay) on 7.4.3 (2811)