Page MenuHomePhabricator

Apple Pay: Add path to donate form
Closed, ResolvedPublic

Description

This task covers two pieces:

Update Settings cell

Update the Settings "Donate" option from "Support Wikipedia (external icon)" to "Donate to Wikipedia (no icon)"

Screenshot 2023-10-02 at 10.48.56 AM (202×447 px, 15 KB)

We will only change this design if the user qualifies for the Netherlands or Italy campaigns (Config start and end dates are located here):

  1. Their device country code is set to Netherlands or Italy in iOS Settings > Language & Region > Region
  2. The device date falls into the Netherlands or Italy campaign start date and end date (starting Oct 17th).

Otherwise we will fall back to the old behavior. "Support Wikipedia (external icon)" cell in Settings, and tapping will take them to an external browser app showing donate.wikipedia.org.

Present the "Donate with Apple Pay?" action sheet

Present the "Donate with Apple Pay?" action sheet after tapping the Settings "Donate to Wikipedia" cell or after tapping the "Donate" button in the new campaign modal.

Screenshot 2023-10-02 at 10.51.03 AM (245×382 px, 17 KB)

We will only present this "Donate with Apple Pay?" action sheet if:

  1. Their device country code is set to Netherlands or Italy in iOS Settings > Language & Region > Region
  2. The device current date falls into the Netherlands or Italy campaign start date and end date. (starting Oct 17th).
  3. The user has Apple Pay set up with a valid card in Apple Wallet.

If they only qualify for 1 & 2 but not 3, we will send them straight to the in-app web view displaying donate.wikipedia.org. If they don't qualify for 1 or 2, they will fall back to the old behavior and go to an external browser app showing donate.wikipedia.org.

Some engineering background details can be seen in https://docs.google.com/document/d/1fXdHRknr8gz5Pou8PHFujIpb8Im06rDWdW04liFH42s/edit.

Testing Notes

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

Event Timeline

Tsevener triaged this task as Medium priority.Sep 7 2023, 2:33 PM
Tsevener updated the task description. (Show Details)

@JTannerWMF @cmadeo

For now, I have implemented this as an alert view here for speed. An alert view is easier to implement on iPad (an action sheet shows as a popover with extra logic needed for where the arrow points), and only alert views allow me to bold an option.

IMG_0228.PNG (2×1 px, 487 KB)

IMG_0229.PNG (2×1 px, 1 MB)

I will add action sheet handling to the list of remaining things that need to be prioritized.

We want this to remain an action sheet and not an alert