Woo Swish e-commerce

Description

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.

Installation

  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 between
    —–BEGIN RSA PRIVATE KEY—–
    and
    —–END RSA PRIVATE KEY—–
    and put it before
    —–BEGIN CERTIFICATE—–
    —–END CERTIFICATE—–
    —–BEGIN CERTIFICATE—–
    —–END CERTIFICATE—–
    —–BEGIN CERTIFICATE—–
    —–END CERTIFICATE—–
  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 should 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.

Reviews

Underbar support

Hade problem med pluginet men fick hjälp direkt. Rekommenderar starkt, utan tvekan det bästa pluginet för swish som finns där ute.

Excellent

Thanks Tobbe for an excellent plug-in, works great, simple installation, good manual, quick and correct support. But one thing - remember to uncheck testmode!
Read all 5 reviews

Contributors & Developers

“Woo Swish e-commerce” is open source software. The following people have contributed to this plugin.

Contributors

“Woo Swish e-commerce” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Woo Swish e-commerce” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.5.0

  • Added: Support for systems using NSS

1.4.0

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

1.3.0

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

1.2.3

  • 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.

1.2.2

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

1.2.1

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

1.2.0

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

1.1.2

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

1.1.1

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

1.1.0

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

1.0.5

  • Better Installation instructions

1.0.4

  • Minor changes

1.0.3

  • Minor changes (language, images)

1.0.2

  • Correcting stable release number.

1.0.1

  • Small fix to check the correct WordPress version.

1.0.0

  • Initial public release.