Problem when trying creating an Apple Pay payment token

Hello Dears, We're trying to setup apple pay button on our website with a payment gateway We're in the token step Creating an Apple Pay payment token is the first step to creating a Tap(Payment gateway token) when we're sending the certificate to the apple endpoint we should send it as a PEM file, not CER The error that we got

"message": "unable to set private key file: '/Users/a/Documents/Sites/ish/storage/apple-pay/tap-payment/apple-pay.pem' type PEM",

since we contact the payment gateway the advised us to contact apple support.. can you help us please.

Thanks for understanding