nyehandelab / omnipay-swish

Swish gateway from nyehandel
https://nyehandel.se
MIT License
0 stars 1 forks source link

how get or create .key and .pem and caCert for use this package #1

Closed parsysm closed 2 years ago

parsysm commented 2 years ago

hi i using this package and refisteration on swish payment www.swish.nu but i not idea for creating or get key / pem file Therefore, to the problem and error, Ett okänt fel har söllät, kontakta supporten! I face Thank you for your guidance

parsysm commented 2 years ago

Order the “Swish handel” service from your local Swedish bank.

Generate private key and CSR, at http://portal.swish.nu/company/certificates/ (see https://assets.ctfassets.net/zrqoyh8r449h/70IepbShaTPqL3ZBWPeefP/00fbc0eeed701f67fd93a07d08ee219b/Swish_Certificate_Management_Guide_1.6.pdf)

Using cpanel:

Select “SSL/TLS” at the “Security” section
Select “Private Keys (KEY)”
Scroll down to “Generate a New Private Key” and select the key size of 4096. Type “Swish” in the “Description”-field Click “Generate”
Select “Return to SSL Manager”
Select “Certificate Signing Requests (CSR)”
In the “Key” field select the keyname that you entered creating the keys (in our example it was “Swish”)

Enter the following:

Domains: yourwebsite.name State: State/Province Country : Sweden Company: Your company name Company Division: Department or leave blank Email: your@email.se Passphrase: Select password if you want (remember if and enter it in the Payment-Swish admin screen) Description: A description or leave blank

Select “Generate”

copy the data in the “Encoded Certificate Signing Request”-field and use it at in step 5 below.

Use the data that you copied from cpanel or the file “swish.csr” created in command line to create a swish-certificate at https://comcert.getswish.net/cert-mgmt-web/authentication.html (must be done by a certified person from step 3) Login using your (swedish) personal id, your organisation number and your Swish-number (starting with 123) Click on the tab “new certificate” Paste the contents from cpanel or your “swish.csr”-file from step 4 into the field “Paste CSR” and make shure that the format “PEM” is selected. Click “Generate” to create the certificate. Copy and paste the certificate data to a file with the ending .pem (in our example swish.pem)

Open your swish.pem file and paste the content from your swish.key file in the top of the file.

Place the certificate file somewhere in your server filesystem. Use FTP or filemanager in cpanel if avaliable. Make a note on the full file-path and name of your certificate. Configure and activate plugin. Select “Use local Swish certificate” as your connection preference Input the location of the certificate from step 7. If you did create the certificate in step 4 using a password, you need to input this on the configuration screen Input your Swish-number (starting with 123) Change the rest of the configuration parameters as you wish. Save the settings. Make a test payment to ensure that everything is working as it should.