Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Apple Pay Note: CSR CER P12 PEM
電腦先安裝openssl (Mac已有內建)
Apple Pay有2種cer
Apple Pay Merchant Identity Certificate
merchant_id.cer <= 建立交易使用
Apple Pay Payment Processing Certificate
apple_pay.cer <= 驗證交易使用
[cer產生方式] (只能使用Mac)
使用【鑰匙圈】建立2種csr
分別上傳Apple Developer後台
Identifiers => Merchant ID => Edit or Configure Merchant ID
分別上傳後系統會生成2種cer憑證提供下載
[p12產生方式] (只能使用Mac)
Apple Developer後台下載2種cer
分別點2下安裝到【鑰匙圈】
從【鑰匙圈】匯出p12
2種p12分別命名為
merchant_id.p12
apple_pay.p12
[pem產生方式]
使用openssl
Merchant Identity
openssl pkcs12 -in merchant_id.p12 -out merchant_id_crt.pem -clcerts -nokeys
openssl pkcs12 -in merchant_id.p12 -out merchant_id_key.pem -nocerts -nodes
Payment Processing
openssl pkcs12 -in apple_pay.p12 -out apple_pay_crt.pem -clcerts -nokeys
openssl pkcs12 -in apple_pay.p12 -out apple_pay_key.pem -nocerts -nodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment