I'm trying to figure out if it is possible to upload a TLS client certificate to be used for my cloud functions in firebase. The TLS client certificate is required by a third-party payment solution called Swish.
This is my first firebase project and it seems silly that a small issue like this will render the platform unusable for me..
After some headache and trying I found a quite easy way to solve swish-payments through cloud functions:
Using request-js instead of the built in libraries, I only need to build the options object to use in the request.post() method as following:
The cert.p12-file should be placed in the same folder as index.js and will be uploaded together with the functions.
The body-object should contain all fields specified in the Swish API, use console.log() to read the error-messages from the Swish-server.