- Supports OpenCart 3.0.0.0 - 3.0.3.8 (older versions can be found in the branches)
- Requires PHP 7.3 or higher
Features:
- Svea Checkout
- Standalone payment modules for invoices, payment plans, card and direct bank payments in Sweden, Finland, Norway, Denmark, Netherlands and Germany.
- Includes integrated admin functionality that corresponds with Svea Ekonomi's servers, current functions are delivering, confirming, canceling and crediting orders
- Product price widget for lowest monthly cost on products where applicable
If you are experiencing technical issues with this module, or if you have a feature suggestion, please submit an issue on the GitHub issue page.
For release history, see github release tags
Before installing, we recommend that you set up a test environment and make a backup of your existing site, database and settings.
The following examples assumes that you have already downloaded and installed OpenCart, if you are upgrading from a previous version of the module disable and uninstall the module from the OpenCart backend before installing and delete the vqcache folder if you're using VQMod.
- Download the latest version of the module from repository
- Extract the contents of the folder "src/" into your OpenCart root directory, the folders admin, catalog, svea should merge with the existing folders
- If you are going to use Svea Checkout see 1.2 Checkout otherwise follow 1.3 Standalone payment methods
- Navigate to the Extensions/Modules page and find Svea Checkout
- Install Svea Checkout
- Select the options you which to use and fill out your credentials that are give to you by Svea Ekonomi.
Now you're all set! You have now configured all the required settings for the checkout and can now proceed with using the checkout!
- Navigate to the Extensions/Payment page and find the payment methods that you wish to use
- The available standalone payment methods are: Svea Invoice, Svea Payment Plan, Svea Card payments, Svea Directbank payments.
- Install & configure the payment modules
After configuring the payment modules the payment methods will show up on your checkout page.
If you want to use an invoice fee for the checkout you have to send a request to support-webpay@sveaekonomi.se with the amount you want B2C customers to pay and the amount you want B2B customers to pay. The integration team will then configure your checkout merchant in Svea's database.
As soon as the integration team has configured your merchant in the database, the prices will appear automatically on orders where customers select invoice, the team will inform you when the change has been made.
If you are using the regular the standalone Svea Invoice payment method, follow the steps below to set an invoice fee.
- Navigate to Extensions/Order Totals in your OpenCart admin
- Find Svea Invoice Fee in the list and install it
- For each country which you will accept invoice payments from, select the corresponding tab and fill all the fields
- Select a value for the sort order e.g. 4 or 5, preferably a value lower than the sort order for taxes otherwise there will be no tax on the invoice fee
- For use with vouchers, the voucher module sort order must be after taxes.
- For coupons, the coupon module sort order (in admin, under extensions/order totals) must be set to have a lower sort order than taxes.
- Also, the coupon discount amount (in admin, under sales/coupon) must be specified excluding tax. The coupon tax discount will then be calculated in accordance with OpenCart standard behaviour, and is specified in the order history.
- The recommended order total sort order is: sub-total (lowest), Svea invoice fee, shipping, coupon, taxes, store credit, voucher and total.
It's possible to hide the comments added by the module by enabling "Hide Svea comments" on the administration page of the payment method. This will however not hide messages that contain critical information, for example invoiceIds or contractNumbers.
Important! The Svea order id information saved in the Comment field must not be changed for the action to work. You may add to the information, but not change or remove it.
When configuring the payment methods that you're going to use you have to select which order statuses that you want to apply for a certain action. There are two lists on every payment method that you can configure and you have to select atleast one status in each of the lists. By then changing the order status on the order to one of the statuses in the lists, the corresponding action will be sent to Svea's servers.
Actions available:
Method | Deliver order | Cancel order | Credit order | Auto Deliver order |
---|---|---|---|---|
Invoice | * | * | * | * |
Payment plan | * | * | * | * |
Card | * | * | * | * |
Direct bank | N/A | N/A | * | N/A |
Always check that your settings are properly configured before posting issues or contacting our support, go through these steps first:
- Your username, password, client no for Invoice and Part Payment are correct and doesn't contain any whitespaces.
- Your secret word and merchant id for Card and Direct bank payments are correct and that the test-secret word and production-secret word are in their correct fields and doesn't contain any whitespaces.
- Your secret word and merchant id for Svea Checkout are correct and that the test-secret word and production-secret word are in their correct fields and doesn't contain any whitespaces.
- Under system -> localisation, the correlating tax class, tax rate (including customer groups), currency and geo zone settings are correct.
- Under extensions -> order totals, the sort order et al are correct.
The invoice fee shows doesn't seem to be included in the OpenCart order total, though it is present in the Svea invoice?
Ensure that you have specified a valid tax class for the country in question in the Svea invoice fee module.
Check that you don't attempt to reuse order numbers, if you're reusing old order numbers you won't be able to complete any transaction. To fix this, change the order number series in the opencart order table in your database.
First make sure that you have a cart filled with items of a value that fits in one of the campaigns, if that doesn't solve it follow these steps:
- Navigate to Extensions/Payments
- Find Svea payment plan and press Edit
- Scroll down to the bottom find the Min. amount box Is the amount too high? In that case, lower it and press Save
Pressing save will send a request to our servers which will update all your campaigns.
If you see the "Thank you for your purchase" instead of the checkout iframe, the order number that OpenCart sends to Sveas server is already used with the merchantId that you have.
To fix this you have to go in to your database and to the table oc_order and find the latest order. Change the order_id on that order to a much higher number, this will almost always ensure that the range isn't used.
Enabling the product price widget on either Svea Checkout, Svea Invoice or Svea Part payment will result in a "price box" appearing on the product page.
Note! Only applicable in Sweden, Norway, Finland.
Example:
The extension uses OCMod to insert the price widget on the product page. You need to install OCMod manually:
- Under Extensions -> Installer, click on Upload.
- Select widget.ocmod.zip from the folder "widget/".
- Under Extensions -> Modifications, click on Refresh.
If you have a custom theme and the widget is not visible, you probably need to modify the following file and specify where to place the widget:
catalog/view/theme/[YOUR THEME]/template/product/product.twig
Insert the following code where you want to place the widget:
{# svea-widget #}
The request made from the card and direct payment modules to Svea's systems are made through a redirected form. The response of the payment is then returned to the module via POST or GET (selectable in the corresponding Svea admin interface).
Keep in mind that a long response string sent via GET could get cut off in some browsers and especially in some servers due to server limitations. Our recommendation to solve this is to check the PHP configuration of the server and set it to accept at LEAST 1024 characters.
As our servers are using SSL-certificates and when using POST to get the response from a payment the users browser prompts the user with a question whether to continue or not, if the receiving site does not have a certificate. Would the customer then click cancel, the process does not continue. This does not occur if your server holds a certificate. To solve this we recommend that you purchase a SSL-certificate from your hosting provider or get one for free through Let's Encrypt.