0

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?

  • Did you set up your apple pay info before entering to this step? AFAIK, there is a page for you to setup apple pay merchant id. Perhaps after this step, the 'merchantid-' path will be available. – Ken Chen Jul 15 '20 at 10:23
  • Yes, everything's set up properly on Apple's Developer site. I'm left with the last step which is to verify ownership of my domain. This is where Salesforce is making things difficult since it seems like it's impossible to control the verification txt file name on their platform. – devloader Jul 15 '20 at 14:48
  • @devloader Were you able to get through this? I am having the same problem. – Sagar Thoriya Jun 21 '22 at 13:06

1 Answers1

0

You will have to use salesforce's url rewriter class and redirect the url to visualforce page. Follow the steps:

  1. Add .txt file(provided by apple) to static resource, make sure static resource is public
  2. create a visualforce page that fetches the content from above static resource you can use getContent() method
  3. Have salesforce site, add above created visualforce page into the site.
  4. Add URL rewriter class that you have created earlier for the site.

Now you can click on verfiy button from apple's site.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – hossein Jul 28 '23 at 07:07