activemerchant_banklink 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/README.rdoc +8 -5
- data/lib/active_merchant/billing/integrations/{pizza → banklink}/helper.rb +3 -3
- data/lib/active_merchant/billing/integrations/{pizza → banklink}/notification.rb +17 -9
- data/lib/active_merchant/billing/integrations/{pizza.rb → banklink.rb} +39 -13
- data/lib/active_merchant/billing/integrations/sampo_est/helper.rb +2 -2
- data/lib/active_merchant/billing/integrations/sampo_est/notification.rb +2 -2
- data/lib/active_merchant/billing/integrations/sampo_est.rb +1 -1
- data/lib/active_merchant/billing/integrations/seb_est/helper.rb +2 -2
- data/lib/active_merchant/billing/integrations/seb_est/notification.rb +2 -2
- data/lib/active_merchant/billing/integrations/seb_est.rb +1 -1
- data/lib/active_merchant/billing/integrations/swedbank_est/helper.rb +2 -2
- data/lib/active_merchant/billing/integrations/swedbank_est/notification.rb +2 -2
- data/lib/active_merchant/billing/integrations/swedbank_est.rb +1 -1
- data/lib/active_merchant/billing/integrations/swedbank_ltu/helper.rb +20 -0
- data/lib/active_merchant/billing/integrations/swedbank_ltu/notification.rb +12 -0
- data/lib/active_merchant/billing/integrations/swedbank_ltu.rb +99 -0
- data/lib/activemerchant_banklink/version.rb +1 -1
- data/lib/activemerchant_banklink.rb +2 -1
- data/test/unit/integrations/notifications/seb_est_notification_test.rb +8 -6
- data/test/unit/integrations/sampo_est_module_test.rb +2 -1
- data/test/unit/integrations/seb_est_module_test.rb +2 -1
- data/test/unit/integrations/swedbank_est_module_test.rb +2 -1
- metadata +10 -7
data/.gitignore
CHANGED
data/README.rdoc
CHANGED
@@ -1,30 +1,33 @@
|
|
1
1
|
= Active Merchant Banklink
|
2
2
|
|
3
|
-
WARNING: this is an early release. THINGS WILL CHANGE.
|
4
|
-
|
5
3
|
This library adds Banklink payment integration support to {ActiveMerchant}[http://activemerchant.org].
|
6
4
|
|
7
5
|
Gem is originally based on ActiveMerchant {fork}[https://github.com/indrekj/active_merchant] by Indrek Juhkam.
|
8
6
|
|
7
|
+
== Supported banks
|
8
|
+
|
9
|
+
Swedbank (Estonia, Lithuania)
|
10
|
+
SEB (Estonia)
|
11
|
+
|
9
12
|
== Installation
|
10
13
|
|
11
14
|
=== From Ruby Gems
|
12
15
|
|
13
16
|
Installation from RubyGems
|
14
17
|
|
15
|
-
|
18
|
+
gem install activemerchant_banklink
|
16
19
|
|
17
20
|
=== From Git
|
18
21
|
|
19
22
|
You can check out the latest source from git:
|
20
23
|
|
21
|
-
|
24
|
+
git clone git://github.com/laurynas/activemerchant_banklink.git
|
22
25
|
|
23
26
|
== Testing
|
24
27
|
|
25
28
|
You can run the tests from this gem with (inside the activemerchant_banklink directory):
|
26
29
|
|
27
|
-
|
30
|
+
rake test
|
28
31
|
|
29
32
|
== Maintainer
|
30
33
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module ActiveMerchant #:nodoc:
|
2
2
|
module Billing #:nodoc:
|
3
3
|
module Integrations #:nodoc:
|
4
|
-
module
|
4
|
+
module Banklink #:nodoc:
|
5
5
|
module Helper #:nodoc:
|
6
6
|
|
7
7
|
def self.included(base)
|
@@ -25,7 +25,7 @@ module ActiveMerchant #:nodoc:
|
|
25
25
|
def initialize(order, account, options = {})
|
26
26
|
old_valid_keys = [:amount, :currency, :test]
|
27
27
|
new_valid_keys = [:description, :reference]
|
28
|
-
valid_keys = (old_valid_keys + new_valid_keys +
|
28
|
+
valid_keys = (old_valid_keys + new_valid_keys + Banklink.required_service_params.values << :service_msg_number).uniq
|
29
29
|
options.assert_valid_keys(valid_keys)
|
30
30
|
|
31
31
|
@options = options
|
@@ -73,7 +73,7 @@ module ActiveMerchant #:nodoc:
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def add_required_params
|
76
|
-
required_params =
|
76
|
+
required_params = Banklink.required_service_params[@service_msg_number]
|
77
77
|
required_params.each do |param|
|
78
78
|
param_value = (@options.delete(param) || send(param.to_s.downcase)).to_s
|
79
79
|
add_field param, iconv.iconv(param_value)
|
@@ -1,15 +1,15 @@
|
|
1
1
|
module ActiveMerchant #:nodoc:
|
2
2
|
module Billing #:nodoc:
|
3
3
|
module Integrations #:nodoc:
|
4
|
-
module
|
4
|
+
module Banklink
|
5
5
|
module Notification
|
6
6
|
|
7
7
|
# A helper method to parse the raw post of the request & return
|
8
8
|
# the right Notification subclass based on the sender id.
|
9
|
-
def self.get_notification(http_raw_data)
|
10
|
-
|
11
|
-
|
12
|
-
end
|
9
|
+
#def self.get_notification(http_raw_data)
|
10
|
+
# params = ActiveMerchant::Billing::Integrations::Notification.new(http_raw_data).params
|
11
|
+
# Banklink.get_class(params)::Notification.new(http_raw_data)
|
12
|
+
#end
|
13
13
|
|
14
14
|
def bank_signature_valid?(bank_signature, service_msg_number, sigparams)
|
15
15
|
self.class.parent.get_bank_public_key.verify(OpenSSL::Digest::SHA1.new, bank_signature, generate_data_string(service_msg_number, sigparams))
|
@@ -18,6 +18,14 @@ module ActiveMerchant #:nodoc:
|
|
18
18
|
def complete?
|
19
19
|
params['VK_SERVICE'] == '1101'
|
20
20
|
end
|
21
|
+
|
22
|
+
def wait?
|
23
|
+
params['VK_SERVICE'] == '1201'
|
24
|
+
end
|
25
|
+
|
26
|
+
def failed?
|
27
|
+
params['VK_SERVICE'] == '1901'
|
28
|
+
end
|
21
29
|
|
22
30
|
def currency
|
23
31
|
params['VK_CURR']
|
@@ -90,10 +98,10 @@ module ActiveMerchant #:nodoc:
|
|
90
98
|
private
|
91
99
|
# Take the posted data and move the relevant data into a hash
|
92
100
|
# No parsing since we're already expecting a hash.
|
93
|
-
def parse(params)
|
94
|
-
|
95
|
-
|
96
|
-
end
|
101
|
+
#def parse(params)
|
102
|
+
# raise(ArgumentError, 'Need a hash') unless params.is_a?(Hash)
|
103
|
+
# @params = params
|
104
|
+
#end
|
97
105
|
end
|
98
106
|
end
|
99
107
|
end
|
@@ -1,19 +1,31 @@
|
|
1
|
-
require 'active_merchant/billing/integrations/
|
2
|
-
require 'active_merchant/billing/integrations/
|
1
|
+
require 'active_merchant/billing/integrations/banklink/helper.rb'
|
2
|
+
require 'active_merchant/billing/integrations/banklink/notification.rb'
|
3
3
|
module ActiveMerchant #:nodoc:
|
4
4
|
module Billing #:nodoc:
|
5
5
|
module Integrations #:nodoc:
|
6
|
-
module
|
6
|
+
module Banklink
|
7
7
|
|
8
|
-
#
|
9
|
-
def self.get_class(
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
# Detect bank module from params
|
9
|
+
#def self.get_class(params)
|
10
|
+
# case params['VK_SND_ID']
|
11
|
+
# when 'EYP' then SebEst
|
12
|
+
# when 'SAMPOPANK' then SampoEst
|
13
|
+
# when 'HP' then SwedbankEst
|
14
|
+
|
15
|
+
# Swedbank uses same sender id for different countries, currently can't detect Lithuanian
|
16
|
+
# use:
|
17
|
+
# notify = SwedbankLtu::Notification.new(params)
|
18
|
+
#when 'HP' then SwedbankLtu
|
19
|
+
|
20
|
+
#when '70440' then SebLtu
|
21
|
+
#when 'SMPOLT22' then DanskeLtu
|
22
|
+
#when 'SNORLT22' then SnorasLtu
|
23
|
+
#when '112029720' then DnbnordLtu
|
24
|
+
#when '70100' then UbLtu
|
25
|
+
|
26
|
+
# else raise(ArgumentError, "unknown sender id: #{params['VK_SND_ID']}")
|
27
|
+
# end
|
28
|
+
#end
|
17
29
|
|
18
30
|
# Define required fields for each service message.
|
19
31
|
# We need to know this in order to calculate VK_MAC
|
@@ -57,6 +69,20 @@ module ActiveMerchant #:nodoc:
|
|
57
69
|
'VK_REF',
|
58
70
|
'VK_MSG',
|
59
71
|
'VK_T_DATE'],
|
72
|
+
1201 => [
|
73
|
+
'VK_SERVICE',
|
74
|
+
'VK_VERSION',
|
75
|
+
'VK_SND_ID',
|
76
|
+
'VK_REC_ID',
|
77
|
+
'VK_STAMP',
|
78
|
+
'VK_AMOUNT',
|
79
|
+
'VK_CURR',
|
80
|
+
'VK_REC_ACC',
|
81
|
+
'VK_REC_NAME',
|
82
|
+
'VK_SND_ACC',
|
83
|
+
'VK_SND_NAME',
|
84
|
+
'VK_REF',
|
85
|
+
'VK_MSG'],
|
60
86
|
1901 => [
|
61
87
|
'VK_SERVICE',
|
62
88
|
'VK_VERSION',
|
@@ -94,7 +120,7 @@ module ActiveMerchant #:nodoc:
|
|
94
120
|
# '003val1003val2006value3'
|
95
121
|
def generate_data_string(service_msg_number, sigparams)
|
96
122
|
str = ''
|
97
|
-
|
123
|
+
Banklink.required_service_params[Integer(service_msg_number)].each do |param|
|
98
124
|
val = sigparams[param].to_s # nil goes to ''
|
99
125
|
str << func_p(val) << val
|
100
126
|
end
|
@@ -3,8 +3,8 @@ module ActiveMerchant #:nodoc:
|
|
3
3
|
module Integrations #:nodoc:
|
4
4
|
module SampoEst #:nodoc:
|
5
5
|
class Helper < ActiveMerchant::Billing::Integrations::Helper #:nodoc:
|
6
|
-
include
|
7
|
-
include
|
6
|
+
include Banklink::Common
|
7
|
+
include Banklink::Helper
|
8
8
|
|
9
9
|
def vk_charset
|
10
10
|
'ISO-8859-4'
|
@@ -3,8 +3,8 @@ module ActiveMerchant #:nodoc:
|
|
3
3
|
module Integrations #:nodoc:
|
4
4
|
module SampoEst #:nodoc:
|
5
5
|
class Notification < ActiveMerchant::Billing::Integrations::Notification #:nodoc:
|
6
|
-
include
|
7
|
-
include
|
6
|
+
include Banklink::Common
|
7
|
+
include Banklink::Notification
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
|
|
38
38
|
#
|
39
39
|
# def notify
|
40
40
|
# # Notification class is automatically fetched based on the request parameters.
|
41
|
-
# notify =
|
41
|
+
# notify = Banklink::Notification.get_notification(params)
|
42
42
|
#
|
43
43
|
# if notify.acknowledge
|
44
44
|
# ... process order ... if notify.complete?
|
@@ -3,8 +3,8 @@ module ActiveMerchant #:nodoc:
|
|
3
3
|
module Integrations #:nodoc:
|
4
4
|
module SebEst #:nodoc:
|
5
5
|
class Helper < ActiveMerchant::Billing::Integrations::Helper #:nodoc:
|
6
|
-
include
|
7
|
-
include
|
6
|
+
include Banklink::Common
|
7
|
+
include Banklink::Helper
|
8
8
|
|
9
9
|
def vk_charset
|
10
10
|
'UTF-8'
|
@@ -3,8 +3,8 @@ module ActiveMerchant #:nodoc:
|
|
3
3
|
module Integrations #:nodoc:
|
4
4
|
module SebEst #:nodoc:
|
5
5
|
class Notification < ActiveMerchant::Billing::Integrations::Notification #:nodoc:
|
6
|
-
include
|
7
|
-
include
|
6
|
+
include Banklink::Common
|
7
|
+
include Banklink::Notification
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
|
|
38
38
|
#
|
39
39
|
# def notify
|
40
40
|
# # Notification class is automatically fetched based on the request parameters.
|
41
|
-
# notify =
|
41
|
+
# notify = Banklink::Notification.get_notification(params)
|
42
42
|
#
|
43
43
|
# if notify.acknowledge
|
44
44
|
# ... process order ... if notify.complete?
|
@@ -3,8 +3,8 @@ module ActiveMerchant #:nodoc:
|
|
3
3
|
module Integrations #:nodoc:
|
4
4
|
module SwedbankEst #:nodoc:
|
5
5
|
class Helper < ActiveMerchant::Billing::Integrations::Helper #:nodoc:
|
6
|
-
include
|
7
|
-
include
|
6
|
+
include Banklink::Common
|
7
|
+
include Banklink::Helper
|
8
8
|
|
9
9
|
def vk_charset
|
10
10
|
'ISO-8859-1'
|
@@ -3,8 +3,8 @@ module ActiveMerchant #:nodoc:
|
|
3
3
|
module Integrations #:nodoc:
|
4
4
|
module SwedbankEst #:nodoc:
|
5
5
|
class Notification < ActiveMerchant::Billing::Integrations::Notification #:nodoc:
|
6
|
-
include
|
7
|
-
include
|
6
|
+
include Banklink::Common
|
7
|
+
include Banklink::Notification
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
|
|
38
38
|
#
|
39
39
|
# def notify
|
40
40
|
# # Notification class is automatically fetched based on the request parameters.
|
41
|
-
# notify =
|
41
|
+
# notify = Banklink::Notification.get_notification(params)
|
42
42
|
#
|
43
43
|
# if notify.acknowledge
|
44
44
|
# ... process order ... if notify.complete?
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
module Integrations #:nodoc:
|
4
|
+
module SwedbankLtu #:nodoc:
|
5
|
+
class Helper < ActiveMerchant::Billing::Integrations::Helper #:nodoc:
|
6
|
+
include Banklink::Common
|
7
|
+
include Banklink::Helper
|
8
|
+
|
9
|
+
def vk_charset
|
10
|
+
'ISO-8859-1'
|
11
|
+
end
|
12
|
+
|
13
|
+
def vk_charset_param
|
14
|
+
'VK_ENCODING'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
module Integrations #:nodoc:
|
4
|
+
module SwedbankLtu #:nodoc:
|
5
|
+
class Notification < ActiveMerchant::Billing::Integrations::Notification #:nodoc:
|
6
|
+
include Banklink::Common
|
7
|
+
include Banklink::Notification
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/swedbank_ltu/helper.rb'
|
2
|
+
require File.dirname(__FILE__) + '/swedbank_ltu/notification.rb'
|
3
|
+
|
4
|
+
module ActiveMerchant #:nodoc:
|
5
|
+
module Billing #:nodoc:
|
6
|
+
module Integrations #:nodoc:
|
7
|
+
|
8
|
+
# This module implements bank payments through
|
9
|
+
# Swedbank using their bank link service
|
10
|
+
# (http://www.swedbank.lt/lt/pages/verslo/banklink).
|
11
|
+
#
|
12
|
+
# Configuration:
|
13
|
+
# ActiveMerchant::Billing::Integrations::SwedbankLtu.bank_certificate = File.read('cert')
|
14
|
+
# ActiveMerchant::Billing::Integrations::SwedbankLtu.test_bank_certificate = File.read('cert')
|
15
|
+
# ActiveMerchant::Billing::Integrations::SwedbankLtu.private_key = File.read('keyfile')
|
16
|
+
# ActiveMerchant::Billing::Integrations::SwedbankLtu.test_private_key = File.read('keyfile')
|
17
|
+
# ActiveMerchant::Billing::Integrations::SwedbankLtu.production_url = 'https://production-gateway.tld/gw/'
|
18
|
+
#
|
19
|
+
#
|
20
|
+
# The syntax of the helper is as follows:
|
21
|
+
# <% payment_service_for order_id, account_id,
|
22
|
+
# :amount => 50.00,
|
23
|
+
# :service => :swedbank_ltu do |service| %>
|
24
|
+
#
|
25
|
+
# <% service.notify_url url_for(:action => 'notify', :only_path => false) %>
|
26
|
+
# <% service.cancel_return_url 'http://mystore.com' %>
|
27
|
+
# <% end %>
|
28
|
+
#
|
29
|
+
# The order_id parameter is a random id referencing the transaction (VK_STAMP)
|
30
|
+
# The account_id parameter is a id given to you from the bank (VK_SND_ID)
|
31
|
+
# The notify_url is the URL that the bank will send its responses.
|
32
|
+
#
|
33
|
+
# You can handle the notification in
|
34
|
+
# your controller action as follows:
|
35
|
+
#
|
36
|
+
# class NotificationController < ApplicationController
|
37
|
+
# include ActiveMerchant::Billing::Integrations
|
38
|
+
#
|
39
|
+
# def notify
|
40
|
+
# # Notification class is automatically fetched based on the request parameters.
|
41
|
+
# notify = Banklink::Notification.get_notification(params)
|
42
|
+
#
|
43
|
+
# if notify.acknowledge
|
44
|
+
# ... process order ... if notify.complete?
|
45
|
+
# else
|
46
|
+
# ... log possible hacking attempt ...
|
47
|
+
# end
|
48
|
+
# end
|
49
|
+
# end
|
50
|
+
|
51
|
+
module SwedbankLtu
|
52
|
+
|
53
|
+
# Raw X509 certificate of the bank, string format.
|
54
|
+
mattr_accessor :bank_certificate
|
55
|
+
mattr_accessor :test_bank_certificate
|
56
|
+
# RSA public key of the bank, taken from the X509 certificate of the bank. OpenSSL container.
|
57
|
+
def self.get_bank_public_key
|
58
|
+
if ActiveMerchant::Billing::Base.integration_mode == :production
|
59
|
+
cert = self.bank_certificate
|
60
|
+
else
|
61
|
+
cert = self.test_bank_certificate
|
62
|
+
end
|
63
|
+
OpenSSL::X509::Certificate.new(cert.gsub(/ /, '')).public_key
|
64
|
+
end
|
65
|
+
|
66
|
+
mattr_accessor :private_key
|
67
|
+
mattr_accessor :test_private_key
|
68
|
+
# Our RSA private key. OpenSSL container.
|
69
|
+
def self.get_private_key
|
70
|
+
if ActiveMerchant::Billing::Base.integration_mode == :production
|
71
|
+
private_key = self.private_key
|
72
|
+
else
|
73
|
+
private_key = self.test_private_key
|
74
|
+
end
|
75
|
+
OpenSSL::PKey::RSA.new(private_key.gsub(/ /, ''))
|
76
|
+
end
|
77
|
+
|
78
|
+
mattr_accessor :test_url
|
79
|
+
mattr_accessor :production_url
|
80
|
+
def self.service_url
|
81
|
+
mode = ActiveMerchant::Billing::Base.integration_mode
|
82
|
+
case mode
|
83
|
+
when :production
|
84
|
+
self.production_url
|
85
|
+
when :test
|
86
|
+
self.test_url
|
87
|
+
else
|
88
|
+
raise StandardError, "Integration mode set to an invalid value: #{mode}"
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.notification(post)
|
93
|
+
Notification.new(post)
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'active_merchant'
|
2
|
-
require 'active_merchant/billing/integrations/
|
2
|
+
require 'active_merchant/billing/integrations/banklink'
|
3
3
|
require 'active_merchant/billing/integrations/swedbank_est'
|
4
4
|
require 'active_merchant/billing/integrations/seb_est'
|
5
5
|
require 'active_merchant/billing/integrations/sampo_est'
|
6
|
+
require 'active_merchant/billing/integrations/swedbank_ltu'
|
@@ -47,13 +47,14 @@ class SebEstNotificationTest < Test::Unit::TestCase
|
|
47
47
|
include ActiveMerchant::Billing::Integrations
|
48
48
|
|
49
49
|
def setup
|
50
|
-
|
50
|
+
#@seb_est = Banklink::Notification.get_notification(http_raw_data)
|
51
|
+
@seb_est = SebEst::Notification.new(http_raw_data)
|
51
52
|
end
|
52
53
|
|
53
|
-
def
|
54
|
-
|
55
|
-
|
56
|
-
end
|
54
|
+
#def test_get_notification_class_from_banklink
|
55
|
+
# notify_class = Banklink::Notification.get_notification(http_raw_data)
|
56
|
+
# assert notify_class.is_a?(ActiveMerchant::Billing::Integrations::SebEst::Notification)
|
57
|
+
#end
|
57
58
|
|
58
59
|
def test_accessors
|
59
60
|
assert_equal true, @seb_est.complete?
|
@@ -75,7 +76,8 @@ class SebEstNotificationTest < Test::Unit::TestCase
|
|
75
76
|
end
|
76
77
|
|
77
78
|
def test_acknowledgement_fail_with_params_changed
|
78
|
-
|
79
|
+
#@seb_est_wrong = Banklink::Notification.get_notification(http_raw_data.gsub('VK_AMOUNT=33', 'VK_AMOUNT=100'))
|
80
|
+
@seb_est_wrong = SebEst::Notification.new(http_raw_data.gsub('VK_AMOUNT=33', 'VK_AMOUNT=100'))
|
79
81
|
assert_equal false, @seb_est_wrong.acknowledge
|
80
82
|
end
|
81
83
|
|
@@ -4,6 +4,7 @@ class SampoEstModuleTest < Test::Unit::TestCase
|
|
4
4
|
include ActiveMerchant::Billing::Integrations
|
5
5
|
|
6
6
|
def test_notification_method
|
7
|
-
assert_instance_of SampoEst::Notification, SampoEst.notification({'name' => 'cody'})
|
7
|
+
# assert_instance_of SampoEst::Notification, SampoEst.notification({'name' => 'cody'})
|
8
|
+
assert_instance_of SampoEst::Notification, SampoEst.notification('name=cody')
|
8
9
|
end
|
9
10
|
end
|
@@ -4,6 +4,7 @@ class SebEstModuleTest < Test::Unit::TestCase
|
|
4
4
|
include ActiveMerchant::Billing::Integrations
|
5
5
|
|
6
6
|
def test_notification_method
|
7
|
-
assert_instance_of SebEst::Notification, SebEst.notification({'name' => 'cody'})
|
7
|
+
#assert_instance_of SebEst::Notification, SebEst.notification({'name' => 'cody'})
|
8
|
+
assert_instance_of SebEst::Notification, SebEst.notification('name=cody')
|
8
9
|
end
|
9
10
|
end
|
@@ -4,6 +4,7 @@ class SwedbankEstModuleTest < Test::Unit::TestCase
|
|
4
4
|
include ActiveMerchant::Billing::Integrations
|
5
5
|
|
6
6
|
def test_notification_method
|
7
|
-
assert_instance_of SwedbankEst::Notification, SwedbankEst.notification({'name' => 'cody'})
|
7
|
+
#assert_instance_of SwedbankEst::Notification, SwedbankEst.notification({'name' => 'cody'})
|
8
|
+
assert_instance_of SwedbankEst::Notification, SwedbankEst.notification('name=cody')
|
8
9
|
end
|
9
10
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemerchant_banklink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Indrek Juhkam
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-02-04 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|
@@ -37,9 +37,9 @@ files:
|
|
37
37
|
- Rakefile
|
38
38
|
- activemerchant_banklink.gemspec
|
39
39
|
- init.rb
|
40
|
-
- lib/active_merchant/billing/integrations/
|
41
|
-
- lib/active_merchant/billing/integrations/
|
42
|
-
- lib/active_merchant/billing/integrations/
|
40
|
+
- lib/active_merchant/billing/integrations/banklink.rb
|
41
|
+
- lib/active_merchant/billing/integrations/banklink/helper.rb
|
42
|
+
- lib/active_merchant/billing/integrations/banklink/notification.rb
|
43
43
|
- lib/active_merchant/billing/integrations/sampo_est.rb
|
44
44
|
- lib/active_merchant/billing/integrations/sampo_est/helper.rb
|
45
45
|
- lib/active_merchant/billing/integrations/sampo_est/notification.rb
|
@@ -49,6 +49,9 @@ files:
|
|
49
49
|
- lib/active_merchant/billing/integrations/swedbank_est.rb
|
50
50
|
- lib/active_merchant/billing/integrations/swedbank_est/helper.rb
|
51
51
|
- lib/active_merchant/billing/integrations/swedbank_est/notification.rb
|
52
|
+
- lib/active_merchant/billing/integrations/swedbank_ltu.rb
|
53
|
+
- lib/active_merchant/billing/integrations/swedbank_ltu/helper.rb
|
54
|
+
- lib/active_merchant/billing/integrations/swedbank_ltu/notification.rb
|
52
55
|
- lib/activemerchant_banklink.rb
|
53
56
|
- lib/activemerchant_banklink/version.rb
|
54
57
|
- test/test_helper.rb
|