Woo Swish e-commerce

Description

Our plugin makes it possible for you to accept Swish as payment method in your webshop. This payment method suits you if you want to offer your customers fast, simple and safe mobile payments.

As addition to the plugin you need the service Swish e-commerce that you order from one of the Swedish banks offering the service. Ask your bank if it does. Swish e-commerce is a special service developed for e-commerce and differs from the normal private “Swish” service and the corporate Swish corporate. Some banks have made it possible to order the service online in their internet bank but most of the banks still require a filled in and signed form to be sent in.

The plugin supports three connection methods described below:

Technical supplier

Swish offers the possiblity to use a technical supplier when connecting your webshop to your bank.

This is the easiest way to use the plugin. You select BjornTech as Technical Supplier in your internet bank and configure the plugin to use a technical supplier.

Read more about the status of Technical Supplier in your bank and how to configure it in our guide

Local certificate

If your bank is not supporting the choice of technical supplier you can create a certificate of your own and place it on your webserver. You will find instructions for doing this in our installation description.

The creation and installation of a local certificate is a complicated process that requires technical competence. If you do not have this technical competence you can let us do the work. We do this based on a fixed cost. Contact us at hello@bjorntech.com for more information.

Simulator

If you just want to see how the plugin will look like in your webshop or if you need to test payments in your staging or test environment you can configure the plugin to simulate payments.
A payment done via the simulator is done by a pre-configured fictive mobile number and will be automatically approved by the system. Because of this you can not see how the payment will look like in the Swish-app

Installation

Installation instructions for technical supplier

  1. Locate and add the plugin in wordpress by searching for “Swish”.
  2. Activate the plugin through the “Plugins” menu in WordPress.
  3. Order the “Swish handel” service from your local Swedish bank.
  4. Select BjornTech as your Technical provider. This is done in your bank website.
  5. Select “BjornTech as Technical Supplier” as Connection type.
  6. Enter your merchant Swish-number in the field “Swish-number” and your mail address in the “Account mail address” field. Save the settings.
  7. Click “Connect to service”.

  8. When the confirmation mail arrives in your inbox open it and click on the activation link.

  9. Make a test payment to confirm that everything is working.

Installation instructions for local certificate

The process below requires technical skills.

  1. Locate and add the plugin in wordpress by searching for “Swish”.

  2. Activate the plugin through the “Plugins” menu in WordPress.

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

  4. Generate private key and CSR, at https://comcert.getswish.net/ (see https://developer.getswish.se/content/uploads/2019/03/Swish-Certificate-Management-Guide.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.

    Using MacOs terminal or Linux via SSH:

    $ openssl genrsa -out ./swish.key 4096
    $ openssl req -new -sha256 -key ./swish.key -out ./swish.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 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)

  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:
    —–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.
    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.
  9. Make a test payment to ensure that everything is working as it should.

FAQ

Q: I have a private Swish-number (using my mobile number). Can I use this number as merchant number in the plugin?
A: No, you need the service “Swish handel”. Contact your bank to order it.
Q: I have a corporate Swish-number (starting with 123). Can I use this number as merchant number in the plugin?
A: No, you need the service “Swish handel”. Contact your bank to order it.
Q: The plugin installation page tells me that my system is using NSS. What does that mean?
A: A small number of installations are using NSS as mechanism for certificate handling rather than OpenSSL. Your installation is one of theese. The plugin can be configured to work with NSS but this requires deep NSS knowledge. If you do not have this knowledge we do recommend to use our service as Technical supplier.

Reviews

September 6, 2019
Fast and personal support. Elegant code, easy to debug. Error handling of backwards WC compatibility could be better.
August 21, 2019
Excellent plugin for Swish with very fast and excellent support from the developer.
June 4, 2019
I would like to thank you Tobbe for splendid support and plugin after I have an issue with the SWISH plugin certificate installation. He took his time and effort at night trying to help me to solve the problem. Successfully installed and run I do not have enough words to thank him. SUPPORT=110% and more PLUGIN QUALITY= 110% Thank you Tobbe for all your help Kind regards. Leif Jag vill tacka Tobbe för fantastiskt stöd och plugin efter att jag har problem med installationsprogrammet SWISH-plugin certifikat. Han tog sin tid och ansträngning på natten och försökte hjälpa mig att lösa problemet. Installerat och kört framgångsrikt Jag har inte tillräckligt med ord för att tacka honom. SUPPORT = 110% och mer PLUGIN KVALITET = 110% Tack Tobbe för all din hjälp
Read all 11 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

2.2.2

  • New: Technical supplier works for Handelsbanken

2.2.1

  • Fix: Modal information screen did not show when connecting to Technical supplier
  • Fix: Additional CSS changes to get the Swish-logo in the correct size in some themes.

2.2.0

  • Verified to work with WordPress 5.3 and WooCommerce 3.8
  • New: Added setting to select what status a paid order should end up in.
  • Fix: The logo in modal is sometimes VERY large. Changed CSS to ensure that the size is normal
  • Fix: Added message to end customer if something goes wrong when checking for payment

2.1.0

  • New: Technical supplier works for Nordea
  • New: Saving order id as metadata.
  • New: Saving payment id in order when callback is received.
  • New: Logging certificate details.
  • New: Warning when certificate is about to expire or has expired.
  • Fix: Preventing the learndash plugin to set the order to completed at all times.
  • Fix: Swish image did not show in modal sometimes.
  • Fix: Some sites using alternate checkout url format did experience “Unknown error from Swish”.
  • Fix: Added new BankId status messages.

2.0.9

  • Fix: Minor text changes
  • Verified to work with WooCommerce 3.7.0

2.0.8

  • Fix: Added a better more clear error message for the cases where Technical Provider was not selected in the bank
  • Fix: More checks of the Swish-number when enrolling to the Swish service.

2.0.7

  • Fix: Some translations did not upload to WordPress correctly.

2.0.6

  • Fix: Config from previous version was not properly converted to the new.

2.0.5

  • New: Certificate service added, no creation of certificate needed for customers using Swedbank (more banks coming soon).
  • New: New modal checkout layout, select it in the configuration page. It is not working with all themes. Contact us if you have issues with modal checkout in your theme.

1.6.2

  • Verified to work with WooCommerce 3.6.2

1.6.1

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

1.6.0

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

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.