Zen Cart Logo
Forums / Addon Payment Modules / Suomen verkkomaksut (SVM) REST API payment module

Suomen verkkomaksut (SVM) REST API payment module

Views: 2,152

Results 1 to 4 of 4
8 Feb 2013, 2:06 PM
#1
pasi avatar

pasi

Zen Follower

Join Date:
Mar 2004
Location:
Finland
Posts:
435
Plugin Contributions:
1

Suomen verkkomaksut (SVM) REST API payment module

I have made an Suomen Verkkomaksut payment module for ZenCart.

Unlike the one available from Suomen Verkkomaksut website, this one uses the new REST API. This means the users browser doesn't send any data between the webshop and the API... all is done with JSON using CURL during checkout_process by the server.

The module also includes a sidebox that will display the official SVM banner with the payment method logos automatically added that are available for your merchant ID.

It's currently available at GitHub only, while I polish out some details and bugs we've found. (if you really want it NOW, search it from github using "zencart_prr_svm2")

I will post the module in ZC downloads page when I'm sure it's ready enough for public consumption.

Read more about Suomen Verkkomaksut

13 Feb 2013, 9:41 AM
#2
pasi avatar

pasi

Zen Follower

Join Date:
Mar 2004
Location:
Finland
Posts:
435
Plugin Contributions:
1

Re: Suomen verkkomaksut (SVM) REST API payment module

UPDATE:
Fixed a "session timeout" problem when using this module. ZenCart keeps a counter that prevents a logged in user to try checkout_process for more than 3 times. And since this module works it's magics during checkout_process, this limits the tries to 3. Problem occured if the customer cancels the payment and returns to shop and then possibly adds a product etc. and tries again 3 times. Not very likely but still totally valid.

The "3 times slam prevention" isn't turned off or zeroed, but it just prevents the counter to increment when using SVM module.

Also I added a file that was missing previously from GIT. The handler to set the order status after SVM confirms the payment. This also logs failed attempts to logs/directory (or cache/ if logs/ doesn't exist).

18 Feb 2013, 10:17 AM
#3
pasi avatar

pasi

Zen Follower

Join Date:
Mar 2004
Location:
Finland
Posts:
435
Plugin Contributions:
1

Re: Suomen verkkomaksut (SVM) REST API payment module

a bug has been found... SVM API accepts only 2 decimal precision for prices which causes a rounding error on certain sums as they add tax in their service to the already rounded 2 decimal price.

Of course all prices should always be handled without tax in business logic, but this is not possible at the moment. I will convert the module to use prices with taxes.

I have asked SVM if they van add more precision to the price when it is sent to the API without tax and they are looking in to it, but didn't promise anything.

9 Mar 2013, 8:57 AM
#4
pasi avatar

pasi

Zen Follower

Join Date:
Mar 2004
Location:
Finland
Posts:
435
Plugin Contributions:
1

Re: Suomen verkkomaksut (SVM) REST API payment module

I've updated the code in github to include the payment method selection integration,but a new bug was found in it yesterday, and I suggest not using it untill I have finnished fixing it.

I'll keep this thread up to date on the progress.