Open your Keychain Access, locate your Apple Pay private key, export it as .p12 file.
$ openssl pkcs12 -in YourPrivateKey.p12 -nodes -out YourPrivateKey.pem
$ cat YourPrivateKey.pem
The base64 encoded string between BEGIN
and END
is your private key.
-----BEGIN EC PRIVATE KEY-----
{Your-Private-Key-Is-Here}
-----END EC PRIVATE KEY-----
Then you are able to use it like below
var p = new ApplePayParameters
{
PrivateKey = "{Your-Private-Key-Is-Here}"
};
Licensed under the MIT License.