0.0
No commit activity in last 3 years
No release in over 3 years
Banklink integration in your website without active merchant (Latvia)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

Swedbank Banklink¶ ↑

Payment system integration for Latvian banks what uses banklink API.

Changes in 1.1.0¶ ↑

  • Move Swedbank under Bank:Swedbank (Please run tests and refacture)

  • Add SEB banklink support

Changes in 1.0.0¶ ↑

  • No test keys and certificates options.

  • Remove Rails depedency.

  • Refactured SwedbankLv to Swedbank

  • Notification#transaction_id is comming from VK_REF. (not VK_T_NO anymore)

Supported banks¶ ↑

Swedbank (Latvia)
Swedbank (Estonia)

Installation¶ ↑

From Ruby Gems¶ ↑

Not yet in RubyGems

From Git¶ ↑

Insert this into your Gemfile

gem "banklink_lv", git: "artursbraucs/banklink"

Configurations¶ ↑

Insert this in your config file:

Swedbank¶ ↑

Banklink::Swedbank.private_key = File.read("#{Rails.root}/path/to/your_private_key")
Banklink::Swedbank.bank_certificate = File.read("#{Rails.root}/path/to/bank_public_key")
Banklink::Swedbank.production_url = "https://ib.swedbank.lv/banklink"

SEB¶ ↑

Banklink::Seb.private_key = File.read("#{Rails.root}/path/to/your_private_key")
Banklink::Seb.bank_certificate = File.read("#{Rails.root}/path/to/bank_public_key")
Banklink::Seb.production_url = "https://ib.swedbank.lv/banklink"

Helper for view:

options = {}
options[:amount] = '0.01'
options[:currency] = 'LVL'
options[:return] = 'http://yourapp.com/'
options[:reference] = '454'
options[:message] = 'Testing banklink'
@helper = Banklink::Swedbank.helper(TRANS_ID, YOUR_SENDER_ID, options) # OR Banklink::Seb.helper(TRANS_ID, YOUR_SENDER_ID, options)

Then create Notification controller for notify. Then you can notify:

notify = Banklink::Swedbank.notification(request.raw_post) # OR Banklink::Seb.notification(request.raw_post)
@text
if notify.acknowledge
  if notify.complete?
    @text = "Thanks!"
  elsif notify.failed?
    @text = "You didn't paid!"
  else
    @text = "Wait or other status"
  end
else
  @text = "Stmx went wrong"
end

Thats all!

Testing¶ ↑

You can run the tests from this gem with (inside the banklink directory):

rake

Maintainer¶ ↑

This gem is maintained by Arturs Braucs @ Weby