=== Woo Swish e-commerce === Contributors: BjornTech Tags: swish, ecommerce, payment, woocommerce, swish-handel Requires at least: 4.9 Tested up to: 5.2.2 Requires PHP: 7.0 Stable tag: 2.0.6 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html Integrates Swish e-commerce into your WooCommerce installation. == Description == This plugin makes it possible for you to accept automatic Swish payments by using the Swish Handel service. Swish is a local Swedish real-time payment system and can only be used if you have a special Swish-account. The plugin has three operating modes: - NEW: BjornTech Swish Service: If you have Swedbank as your bank the eaisest way to configure the plugin is to select BjornTech Swish Service. When doing this you are using our certificate to connect to Swish and you are up and running within minutes. The service can be used for up to 50 transactions per month free of charge and can be used without any credit card registration. If you have a need for more transactions you can purchase a subscription for up to 1000 transactions a month. Instructions are included in the confirmation mail. Contact us for pricing if you have a need for more than 1000 transactions per month. - Local certificate: The plugin supports the standard Swish certificate. Create one and install it on your webserver using our installation instructions. - Swish simulator: You can start using Swish simulator directly after you have downloaded and installed the plugin - no Swish-account is needed. NB: You can not use the Swish-app for simulator transactions. All transactions are automatically approved and sent back to your system. You will find the settings in WooCommerce->Settings->Payments->Swish == 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. > New: If you have Swedbank as your bank continue with step 4 below. If you do not have Swedbank, continue with step 9 below. > > > More banks to come soon, ask your bank when they will implement "Technical provider" for Swish Handel. 4. Select BjornTech as your Technical provider. This is done in your bank website. 5. Select "BjornTech Swish Service" as Connection type. 6. Enter your merchant swish number in the field "Swish merchant 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. > Congratulations! You are now ready to start using Swish-payments in your webshop. NOTE: Continue with this installation process if your bank does not support Technical providers. See above. 9. 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 ./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) 10. 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) 11. 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----- 12. 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. 13. Configure and activate plugin. Select "Use local Swish certificate" as your connection preference 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: 6. 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. 7. 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/* 8. 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. == Frequently Asked Questions == == Screenshots == == Changelog == = 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. == Upgrade Notice ==