- I. Information
- 1. Installation
- 2. OpenCart configuration
- 3. Svea module configuration
- 4. Miscellaneous
- Supports OpenCart 2.2.0.0 (older and newer versions can be found in the branches)
- Requires PHP 5.3 or higher (namespace support)
- Features Product Price Widget and admin functions requires vQmod to be installed in your OpenCart installation
- Features Sveas new iframe checkout page
- Features Svea Checkout with invoices, payment plans, card and direct bank payments
- Features Payment modules for invoices, payment plans, card and direct bank payments in Sweden, Finland, Norway, Denmark, Netherlands and Germany.
- Features integrated admin functionality that corresponds with Sveas servers, current functions are delivering, confirming, canceling and crediting orders
This module is tested with a clean installation of OpenCart 2.2 with vQmod and it uses the latest Svea php-integration package.
If you are experiencing technical issues with this module, or if you have a feature suggestion, please submit an issue on the GitHub issue list.
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 the module from the OpenCart admin before installing.
- 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 Payment modules
- Login to the admin page
- Navigate to the Extensions/Payments page and find Svea Checkout
- Install Svea Checkout
- Navigate to the Extensions/Modules page and find Svea Checkout
- Install Svea Checkout
- Proceed to 2. OpenCart configuration
- Login to the admin page
- Navigate to the Extensions/Payments page
- Install all the modules that you are going to use
- Proceed to 2. OpenCart configuration
These steps contain general setup information regarding OpenCart, if you already have settings for currencies, geo zones, tax classes and tax rates you can proceed to section 2.5 Additional requirements.
- Navigate to System/Localisation/Currencies
- Click the plus sign in the top-right corner to add a new currency
- Fill in the ISO-code e.g. "SEK" for Swedish Krona
- Fill out the rest of fields and click save in the top-right corner
- Add as many currencies as you want
- Press refresh currency values in the top-right corner
- Navigate to System/Localisation/Geo Zones
- Click the plus sign in the top-right corner to add a new geo zone
- Fill out the fields and add a country
- By not selecting any zone in the table(like in the example below) you will select all zones within the chosen country
- Save
- Navigate to System/Localisation/Taxes/Tax Rates
- Click the plus sign in the top-right corner to add a new tax rate
- Fill out the fields and select the geo zone you created in the previous step and save
- Navigate to System/Localisation/Taxes/Tax Classes
- Click the plus sign in the top-right corner to add a new tax rate
- Fill out the fields and add the tax rate you created in the previous step and save
- The product prices must be given in the default currency if multiple currencies are used.
- Also, prices must be given excluding any taxes.
- Currency decimals must be set to two (2) when using Euro currency.
- For use in Dutch and German stores the postal code needs to be set to required for customer registrations.
- 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.
If you have your shop set up to sell mainly to Swedish customers, but have a substantial number of sales to a foreign country (here: Norway), you might want to charge Swedish tax for Swedish customers, and Norwegian tax for Norwegian customers. Ask your accountant for the precise sales numbers required, or sales abroad in general.
This is done by specifying a tax class containing two different tax rates, one for Sweden and one for Norway with the appropriate tax rates. The tax rates each contain a geo zone. For the Swedish tax rate, the geo zone should include all countries where Swedish vat should be charged (i.e. typically all countries that you sell to, but excluding Norway). The Norwegian tax rate geo zone should then include the countries where Norwegian vat should be charged (i.e. Norway only).
In the tax class settings, make sure that the Norwegian tax rate applies before the Swedish tax rate, i.e. has a higher priority than the Swedish tax rate, and that all tax rate selections are based on the customer Payment Address. The same procedure applies be used for products and i.e. the Svea invoice fee.
After configuring the invoice fee in 3.1 go to either 3.2 Checkout or 3.3 Svea Invoice depending on which one you installed above.
- 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
- Set the status field to enabled
- Set the fee for each country that you are going to accept invoices from(the amount is excluding VAT)
- Select the tax class you created earlier in section 2.4
- 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
- Navigate to Extensions/Modules and press edit on Svea Checkout
- First select the Authorization tab and fill out your credentials that you received from Svea after signing an agreement with us
- Go back to the General tab
- Set Status to Enabled
- Set Test mode to Enabled as you will be needing to do tests before we will allow you to use our production environment
- Set Show default checkout option to Enabled
- Set Pending to Pending
- Set Failed to Failed
- Set Canceled/Annulled to Canceled
- Set Credited to Credited
Congratulations! You have now configured all the required settings for the checkout and can now proceed with testing! You don't have to read anything else from section 3 as it's only if you're not using the checkout.
- Navigate to Extensions/Payments
- Find Svea Invoice in the list and press Edit
- Set the geo zone and sort order to your preferences
- Set Status to Enabled
- Add a description if you want that for the payment method that's shown to the customer
- Set the order statuses with the order statuses you want to trigger the corresponding action to Svea admin. When you edit an order and change the order status, an request will be sent to Svea. The actions available for invoices are Deliver, Credit and Cancel order
- Set Shipping same as billing to yes unless your contract with Svea says otherwise
- Set Auto deliver order to Disabled
- Set Invoice distribution type to either Post if you want the invoices to go by post or Email if you wish for the invoices to get delivered by Email
- Fill out the information for each country that you have a client number for
- Set test mode to Enabled since you will need to do test purchases before you can use the production environment
- Svea Invoice should now be properly configured
- Navigate to Extensions/Payments
- Find Svea payment plan and press Edit
- Set the order statuses with the order statuses you want to trigger the corresponding action to Svea admin. When you edit an order and change the order status, an request will be sent to Svea. The actions available for Payment Plan are Deliver, Credit and Cancel order
- Set the min. amount to the lowest value that's needed for a campaign to be shown(usually 500)
- Set test mode to Enabled since you will need to do test purchases before you can use the production environment
- Svea Part payment should now be properly configured
Our module supports one Svea merchant id per Opencart installation
- Navigate to Extensions/Payments
- Locate Svea card payment in the list, and then press Edit
- Set geo zone and sort order according to your preferences
- Set the order statuses with the order statuses you want to trigger the corresponding action to Svea admin. When you edit an order and change the order status, an request will be sent to Svea. The actions available for Card are Deliver, Credit and Cancel order
- Set test mode and status to enabled since you will need to do test purchases before you can use the production environment
- Fill out the required fields merchant id and secret word. There are tabs for each test and prod. For prod, use your Svea account credentials. For test, make sure to use the supplied test account credentials
Our module supports one Svea merchant id per Opencart installation.
- Navigate to Extensions/Payments
- Locate Svea Direct payment, and then press Edit
- Set geo zone and sort order according to your preferences
- Set the order statuses with the order statuses you want to trigger the corresponding action to Svea admin. When you edit an order and change the order status, an request will be sent to Svea. The actions available for Direct Bank is Credit order
- Set testmode and status to enabled since you will need to do test purchases before you can use the production environment (only applies to Nordea, because there is no test environment for the other banks)
- Fill out the required fields merchant id and secret word. There are tabs for each test and prod. For prod, use your Svea account credentials. For test, make sure to use the supplied test account credentials.
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.
- Go to Sales -> Orders -> Edit order -> Totals tab
- When you change the Order Status to the same status set in module, the action will be sent to Svea admin aswell, meaning you do not have to log in to the Svea admin.
- Save.
Actions available:
Method | Deliver order | Cancel order | Credit order | Auto Deliver order |
---|---|---|---|---|
Invoice | * | * | * | * |
Payment plan | * | * | * | |
Card | * | * | * | |
Direct bank | * |
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.
- 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 right places.
- 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.
- You are using correct test case credentials when conducting test purchases.
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, they need to be unique. I.e. in the call to
$form = WebPay::createOrder()-> ... ->setClientOrderNumber("33")-> ...
the order number "33" can't have been used in a previous order.
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 set "Show Product Price Widget" to yes in your module options a widget will be displaying the minimum invoice amount to pay on the product page. Note: Only applicable if Svea buys the invoices, and for private customers. Only applies in Sweden, Norway, Finland and the Netherlands. Note! Requires vQmod
The request made from the card and direct payment modules to Sveas systems is 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).
Have 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 provider.