Background
We are planning to run banners in the Apps in India this fall. We do not support Native payment through Adyen for India.
Task
- Ensure the ApplePay interstitial only shows for these countries: in the list countryCodeApplePayEnabled within the json file: https://donate.wikimedia.org/wiki/MediaWiki:AppsDonationConfig.json
- If a country is not on the allow list, "Donate" entry points in App menu and banner should lead directly to donate.wikimedia.org
Reference
Equivalent task for Android/GPay: T373410
Engineering Notes
We are already hardcoding a blocked country in the app. we want to switch to making it dynamic and considering an allowlist from the config's countryCodeApplePayEnabled key.
- Modify the config model to pull the new key and its values.
- Replace block logic here with logic that checks the WMFDonateDataController donate config's allow list.
The country code is based on the device's region code (iOS Settings > General > Language and Region > Region. Set it to a blocked country, then test by going to App settings and confirm you are sent straight to a web view (i.e. no native Apple Pay option) after tapping "Donate".
QA notes:
- Switch regions (instructions above) to several different countries/regions that do or do not accept Apple Pay and verify that it goes to web automatically when Apple Pay is not available