Woo Swish e-commerce

      Geen reacties op Woo Swish e-commerce


This plugin makes it possible for you as a woocommerce store owner to accept automatic Swish payments.

Swish is a local Swedish real-time payment system and can only be used if you have a Swish-Handel account.

The plugin has a test mode, just enable it and run test transactions against the Swish test system within seconds.

Contact us in the support forum or at tobbe@bjorntech.se (www.bjorntech.se/swish-handel) if you need help to install the plugin.


  1. Locate and add the plugin in wordpress by searching for “Swish e-commerce”.
  2. Activate the plugin through the “Plugins” menu in WordPress.
  3. Order the “Swish handel” service from your local Swedish bank.
    The bank will ask for one person to be responsible for certificate handling, this person need to perform step 5.

  4. Generate private key and CSR, see https://developer.getswish.se/merchants-swish-cert/1-introduction/

    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.

    Using: MacOs terminal or Linux via SSH:

    openssl genrsa -out ./swish.key 4096
    openssl req -new -sha256 -key ./swish.key -out ./swishcsr.csr

    Enter the following:

    Country Name (2 letter code) – SE
    State or Province Name (full name) – State/Province
    Locality Name (eg, city – City
    Organization Name (eg, company) – Your company name
    Organizational Unit Name (eg, section) – Department or leave blank
    Common Name (eg, fully qualified host name) – yourwebsite.name
    Email Address – your@email.se
    A challenge password – Select password if you want (remember if and enter it in the Payment-Swish admin screen)

  5. Use the file “swishcsr.csr” 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-numner (starting with 123)
    Click on the tab “new certificate”
    Paste the contents from cpanel in step 4a or your “swishcsr.csr”-file in step 4b into the field “Paste CSR” and make shure that the format “PEM” is selected.
    Click “Generate”
    Copy and paste the certificate data to a file with the ending .pem (in our example swish.pem)

  6. Open your swish.pem file and paste the content from your swish.key file in the top of the file.
    Copy everything (including the header and footer) between:
    and put it before
  7. 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.
  8. Configure and activate plugin, you will find the settings in the WooCommerce
    Input the location of the certificate from step 6.
    If you did create the certificate in step 4 using a password, you need to input this on the configuration screen
    Input your merchant swish number
    Change the rest of the configuration parameters as you wish.

If your system is using NSS (mostly used in RedHat or CentOS installations in private servers) you can follow steps 1-5 above and just press enter when asked for password.

Then continue with the alternate steps 6-8 below:

  1. Place the keyfile from step 4 above (in our example swish.key and the swish-certificate file from step 5 above (in our example swish.pem) 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.

  2. Use SSH to connect to your server and move to the path where you placed your files in step 6.

    Execute the following commands (depending on your access rights you may have to use sudo before the commands)

    openssl pkcs12 -export -in ./swish.pem -inkey ./swish.key -out ./swish.pfx
    Press enter two times to set the password to blank

    mkdir certdb

    certutil -N -d sql:certdb –empty-password

    pk12util -i ./swish.pfx -d sql:certdb -W “” -K “”

    copy your certificate nickname text after “pk12util: using nickname:”

    chmod 744 certdb/*

  3. Enter your certificate name from step 7 into the certificate nickname field in the setup and your directory path with /certdb added in the end into the NSS database location field.



  • Verified to work with WooCommerce 3.6.2


  • Fix: Incompatibility with WooCommerce easy table rate shipping caused a fatal error.


  • Verified to work with WordPress 5.1
  • Change: Minor text changes.


  • Added: Support for systems using NSS


  • Verified to work with WordPress 5.0.0
  • New: Start Swish-app can be shown in checkout page, setting possibility also added.


  • Added: Nonce used for callback to increase security.
  • Fix: Customer number now correct on transaction


  • Fix: Wrong link to swish settings page from the plugins page.
  • Change: Test mode moved to own section and described better. Test mode disabled as default.
  • Change: Removed activation hook, certificate distributed in pluin.


  • Added how to merge the key-file and the certificate file


  • Better instructions on how to create the Swish certificate (still not optimal and to complex)


  • Tested and verified with WooCommerce 3.5
  • Test cert now distributed with plugin, download if missing


  • One more fix to make sure that test certs will be loaded when downloading from WordPress


  • Test-certificate was not working Fix to make the test certificate do download when activating
  • Description for the gateway was missing in settings


  • Test certificate is now included in the package. You can run test transactions just by enabling test mode, nothing more required.
  • Some logging removed


  • Better Installation instructions


  • Minor changes


  • Minor changes (language, images)


  • Correcting stable release number.


  • Small fix to check the correct WordPress version.


  • Initial public release.