Before presenting the option to navigate to the Apple Pay donate form, we need to fetch the apps donation form config and payment networks to confirm we have what we need to complete a payment.
Since we need config and payment networks information before they reach the donation form, initial thoughts are to fetch this in the same area where we fetch campaign information. We can move this placement once the path to the native Apple Pay donate form isn't dependent on a currently running campaign.
Donate Config:
- Staging: https://test.wikipedia.org/w/index.php?title=MediaWiki:AppsDonationConfig.json&action=raw
- Production: https://donate.wikimedia.org/w/index.php?title=MediaWiki:AppsDonationConfig.json&action=raw
Payment Networks: (T344860)
- Staging: https://paymentstest4.wmcloud.org/api.php?action=getPaymentMethods?country={device locale countryCode}
- Production: https://payments.wikimedia.org/api.php?action=getPaymentMethods?country={device locale countryCode}
- Params: api_key, country
Submit Payment: (T344774)
- Staging: https://paymentstest4.wmcloud.org/api.php?action=getPaymentMethods?action=submitPayment
- Production: https://payments.wikimedia.org/api.php?action=getPaymentMethods?action=submitPayment
- Params: api_key, amount, currency (USD, CAD, etc), country, language, recurring (1 for yes, 0 or null for no), country, language, payment_token, email, first_name, last_name, full_name, street_address, city, state_province, country, postal_code, opt_in (agreed to emails, 0 or 1), pay_the_fee (agreed to pay transaction fee, 0 or 1)
More technical information can be found at:
https://docs.google.com/document/d/1fXdHRknr8gz5Pou8PHFujIpb8Im06rDWdW04liFH42s/edit
https://docs.google.com/document/d/1CNbIe8p47Woq5MHU7mJwUw3xokEZKt3-FhqY53ogpew/edit