Has anyone figured out how to verify a Salesforce domain with Apple Pay?
Basically, Salesforce does provide a way to verify a domain by going to Setup - Domains and clicking Verify. That prompts you to upload the verification file but Salesforce seems to place it under https://your.domain/.well-known/apple-developer-domain-association.txt whereas Apple is looking for it at your.domain/.well-known/apple-developer-merchantid-domain-association.txt (note the extra merchantid- in the file name).
The main issue is that Salesforce's multi tenant platform doesn't allow for direct access to the file that's placed in .well-known directory and there doesn't seem to be any way to control the file name. Is there any alternative way to verify domain ownership in this case?
You will have to use salesforce's url rewriter class and redirect the url to visualforce page. Follow the steps:
getContent()
methodNow you can click on verfiy button from apple's site.