This is a simple scaffold (boilerplate) project to start working on ApplePay on the Web.
Includes express
server with complete merchant validation using two-way TLS and client typings using @types/applepayjs
.
npm i
- Create dir
./sslcert
for SSL certificates for HTTPS and Merchant Identity Certificate. Putcert.pem
andkey.pem
(for HTTPS),validate-merchant-cert.p12
inside - Edit
.env
. SetMERCHANT_ID
andMERCHANT_ID_CERT_PASS
- Open
/etc/hosts
and add mapping127.0.0.1 localhost.applepay.com
npm start
and open Safari browserhttps://localhost.applepay.com