This subtask covers the native donation form UI work. See parent task for design details.
Technical Details
- Build out donate form that with default amount button options, and a textfield for inputting custom options, as well as a transaction fee checkbox and email opt-in checkbox.
- Form needs to be able to take in a particular currency and country code, in case they came from a campaign plea that specifies a particular currency and country code.
- Default amount button option values, minimum and maximum donation values, and transaction fee amount need to be dynamic depending on currency. Email me checkmark visibility also changes depending on country code. This mapping will be fetched from the donate config (see T345847).
- Formatting here also needs to be based on device’s region, so that decimals/etc are formatted correctly for that user’s region.
- Form needs to have a checkbox for monthly recurring that sends the "recurring" boolean to the submitPayment endpoint.
Background: https://docs.google.com/document/d/1fXdHRknr8gz5Pou8PHFujIpb8Im06rDWdW04liFH42s/edit.
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.
- Device iOS Settings > Language & Region > Region needs to be set to either the Netherlands or Italy
- Device date & time needs to be set on or after the campaign start date (change device date to 10/17)
- 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.
- To be provided the option to donate via Apple Pay (native donate form), you must have a valid card set up in Apple Wallet.