Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEM file for merchant authentication. #56

Open
emberdyn opened this issue Oct 7, 2021 · 1 comment
Open

PEM file for merchant authentication. #56

emberdyn opened this issue Oct 7, 2021 · 1 comment

Comments

@emberdyn
Copy link

emberdyn commented Oct 7, 2021

Can you please explain how you generated the PEM file for merchant authentication?
apple-pay-test-cert.pem

I have tried getting my CSR file from auth.net and uploaded it in the apple developer account to get a .cer file. But that .cer file does not have a private key. How did you get a cert with a private key?

Thanks so much for your help.
@brianmc

@rimager
Copy link

rimager commented Nov 27, 2024

You need to create your own Apple Pay Merchant Identity/PEM File.
Its not the same as the .cer file you get from Apple.

To generate the PEM:

  • To manually generate a Certificate, you need a Certificate Signing Request (CSR) file from your Mac
  • Keychain Access -> Certificate Assistant -> Request a Certificate from a Certificate Authority
  • be sure to check "Save to disk"
  • This CSR is submitted to Apple for an Apple Pay Merchant Identity and you get a .cer file back.
  • Double click the .cer file to install it in the Mac keychain.
  • Select both the Certificate and the private key, right click and select "Export 'Certificate and Private Key' as PEM"
  • Chose p12 format and save to disk.
  • Convert the p12 file to a pem file using the openssl command:
  • openssl pkcs12 -in merchant_id.p12 -out merchant_id.pem -nodes -legacy
  • Save the pem file ito use in your implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants