PayU-EMEA / apple-pay

This library is used to decode tokens for Apple Pay.
49 stars 31 forks source link

Private key #19

Closed webdesign7 closed 1 year ago

webdesign7 commented 3 years ago

Hello,

How / where can I get the private key , our payment provider seems to generate only a CSR which then we upload to Apple

Please advice Thanks

NDQuattro commented 3 years ago

Hey. Contact your PSP for that or make your own CSR and exchange it for the payment processing cert. You have any success?

trydocatch commented 3 years ago

If you have a "payment provider", why do you need the private key? The decoding should be performed by the PSP so only they need the private key.

joerg-thode commented 1 year ago

Hi, i also have Question about the private key, wich is used to decode the Token. You are talking from "Merchant Certificate" in your readme :-) But you mean the private key of the "Apple Pay Payment Processing Certificate" is this correct? Or the private key of the "Apple Pay Merchant Identity Certificate" ?

bratpidd commented 1 year ago

Maybe in the end this will help someone. MacOS tricks.

  1. Private key is taken from Apple Pay Payment Processing Certificate, not the Merchant Identity one.
  2. On MacOS after executing openssl pkcs12 -in <your_cert>.p12 -out private_key.pem -nocerts you will get a file with a section "-----BEGIN PRIVATE KEY-----" etc. This is not what we want, we want a block "-----BEGIN EC PRIVATE KEY-----"
  3. To finally see the EC private key, run openssl ec -in private_key.pem -text
  4. The value is our working private key. Copy it and make it one-line in the code.
JeanCarlosDev17 commented 10 months ago

Maybe in the end this will help someone. MacOS tricks.

  1. Private key is taken from Apple Pay Payment Processing Certificate, not the Merchant Identity one.
  2. On MacOS after executing openssl pkcs12 -in <your_cert>.p12 -out private_key.pem -nocerts you will get a file with a section "-----BEGIN PRIVATE KEY-----" etc. This is not what we want, we want a block "-----BEGIN EC PRIVATE KEY-----"
  3. To finally see the EC private key, run openssl ec -in private_key.pem -text
  4. The value is our working private key. Copy it and make it one-line in the code.

you try with Apple Pay Payment Processing Certificate and work?