Note: The certs/
directory is this directory.
Requirements:
- An account in the Apple Developer Program
- A recent version of Go (tested with v1.9.2)
cfssl
- OpenSSL/libssl-dev
- make
-
Log into your developer account. In the developer console, create a Merchant ID
-
Verify your domain by serving the
apple-developer-merchantid-domain-association
file athttps://yourdomain.com/.well-known/apple-developer-merchantid-domain-association
(the example app will do it for you if you put it inexample/static/.well-known
). Note: Be careful to support one of the supported cipher suites for HTTPS! -
Edit the JSON files in the
certs/
directory of this repo with your merchant ID, your domain and your email address. -
Generate a Payment Processing Certificate request by running
make cert-processing.certSigningRequest
in thecerts/
directory. -
Upload the certificate request to the developer console. Select your merchant ID and click "Create Certificate" in the "Payment Processing Certificate" section
-
Download the signed certificate to
certs/cert-processing.cer
, runmake cert-processing.crt
to convert it to the proper format -
Repeat steps 4-6 for the Merchant Identity Certificate, by running
make cert-merchant.certSigningRequest
and, with the certificate,make cert-merchant.crt
-
Move the directory
certs/
toexample/certs/
-
Deploy the application under your domain.
-
Go to the running application and try to pay with Apple Pay. If you don't see an Apple Pay button, you are probably visiting from an unsupported browser or device. You will not be charged.
Store your certs (*.crt and *.pem files) somewhere remotely and download them during CI/CD or programmatic environment set up.