Giter VIP home page Giter VIP logo

opencart-module's Introduction

Index

I. Information

OpenCart - Svea Checkout and Svea payment modules

  • 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

1. Installation

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.

1.1 General

  • 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

1.2 Svea Checkout

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

1.3 Standalone payment methods

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

1.4 Svea Invoice Fee

If you want to use an invoice fee for the checkout you have to send a request to [email protected] 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

1.5 Additional information

Order Total module sort order

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

Hide Svea comments

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.

2. Miscellaneous

2.1 Administrating orders

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

2.2 Troubleshooting and recommendations

Always check that your settings are properly configured before posting issues or contacting our support, go through these steps first:

Check your Svea customer credentials

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

Check correlated OpenCart settings and localisations

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

Specific payment method problems FAQ

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.

My Svea Checkout, card or direct payments don't go through after reinstalling my shop?

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.

My payment plan method is not displaying any campaigns, what can I do?

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.

My checkout page shows "Thank you for your purchase" instead of the checkout

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.

2.3 Product Price Widget

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:

Product price widget

2.3.1 Install the Product Price Widget

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 #}

2.4 Important information

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

When using GET response

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.

When using POST response

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.

opencart-module's People

Contributors

kfoobar avatar nlii avatar sveateam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencart-module's Issues

I get this in the error log

PHP Notice: Undefined variable: svea_widget in ...../www/vqmod/vqcache/vq2-catalog_view_theme_default_template_product_product.tpl on line 221

Parameterm1

Hello!
I have a issue
PHP Warning: Parameter 1 to ModelTotalSveafee::getTotal() expected to be a reference, value given in /storage/content/49/135549/driver.insamling.eu/public_html/vqmod/vqcache/vq2-system_storage_modification_system_engine_loader.php on line 150

How can i get this working?

"One or more order rows have a vat percent which is not valid for the provided country"

Hi

I have got a problem with this; then choose invoice and delivery and have two tax (25% and 6%) I get this error "One or more order rows have a vat percent which is not valid for the provided country".

If I only change to pick-up it works. If I change the 6% tax to 25% it works. If I have direct payment with delivery and two tax it works.

I have checked my settings, and I have not change anything. All geo-code, tax-setting is OK.

Any suggestion?

EDIT: After some searching, I found that it is Svea Invoice Fee that is the error, if I change the tax inside Svea Invoice Fee to -- None -- or 0% it works.

We have in Sweden 6% tax for books, and the shipment is 25%, and it looks like the Svea Invoice Fee module don't handle two tax.

Best Regards
Thomas

Problem with https and "get back to store"

Hi

We have some problem there our customers get aborted then they have done the payment and is going back to the store.

skarmavbild 2018-01-23 kl 14 21 03

We have an SSL for that domain and that I can see/find is every setting ok in the store.

We use OpenCart 2.3.0.2 and Svea 4.1.0 and this was Direct_payment, but we have some problem with card_payment also.

Any suggestion where to start looking?

Store is; https://www.hyvlar.se

Best Regards
Thomas Lombert

SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found

Svea Direct payment showing this error

Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in ********public_html/svea/sveaekonomi/webpay/src/HostedService/HostedRequest.php on line 67Warning: SimpleXMLElement::__construct(): RESTEASY003870: Unable to extract parameter from http request: javax.ws.rs.FormP in public_html/svea/sveaekonomi/webpay/src/HostedService/HostedRequest.php on line 67Warning: SimpleXMLElement::__construct(): ^ inpublic_html/svea/sveaekonomi/webpay/src/HostedService/HostedRequest.php on line 67
Svea response_error String could not be parsed as XML

i get this warning

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /storage/content/84/173884/jaktverket.se/public_html/admin/controller/payment/svea_partpayment.php on line 287Warning: file_get_contents(): Failed to enable crypto in /storage/content/84/173884/jaktverket.se/public_html/admin/controller/payment/svea_partpayment.php on line 287Warning: file_get_contents(https://raw.githubusercontent.com/sveawebpay/opencart-module/master/docs/info.json): failed to open stream: operation failed in /storage/content/84/173884/jaktverket.se/public_html/admin/controller/payment/svea_partpayment.php on line 287Notice: Trying to get property of non-object in /storage/content/84/173884/jaktverket.se/public_html/admin/controller/payment/svea_partpayment.php on line 290

VQmod

Are there reasons to use VQmod instead of OCMod or is it just a part of legacy?

Svea Directpayment wrong total

Got I transfer from SEB <-> Svea Direct-payment.

Have a product that cost 33.89kr.

Without 25% tax = 27.11kr
Tax = 6.78kr
Use a round of module = +0.11kr
Customer should pay = 34.00kr

The amount that is taken from SEB = 33.78kr

Two questions;
Why is not the last total the amount pulled from bank?
How can it be -0.22kr, there is no sum like that.

skarmavbild 2019-01-01 kl 22 17 23

skarmavbild 2019-01-01 kl 07 39 58

skarmavbild 2019-01-01 kl 22 34 54

Best Regards
Thomas

OpenCart 3.0.3.9 compatibility

Is the latest version of module compatible with opencart OpenCart 3.0.3.9.
If not, when do you plan to implement a version compatible with OpenCart 3.0.3.9.?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.