killbill-payment-test 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Jarfile +5 -5
- data/VERSION +1 -1
- data/killbill-payment-test.gemspec +1 -1
- data/lib/payment_test/api.rb +15 -15
- data/pom.xml +1 -1
- data/spec/payment_test/base_plugin_spec.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a521ab7b3d9c2d62b5a47f5c47bdd1ec92c2f9a4
|
4
|
+
data.tar.gz: 487765e6008007f3bfa1bdbcdb02784fa0d15e78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f55a01963fcdc2a76d4df965fd2172800924ea87b327bc06fbb4126760e75cbd5acee109e8f21dea8e38507e78af3dcb1a5c42073d750aaafe7e9b849bdfe2a
|
7
|
+
data.tar.gz: a1a7bdc8e69f50a10d2c71339fe9688bcb178118fb80b898fb2e1f354c39835de13351f623a005b9301d00b1f2330237135d9cca846924e96464a40bcab29201
|
data/Jarfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
jar 'org.kill-bill.billing:killbill-api', '0.
|
2
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.
|
3
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.
|
4
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.
|
5
|
-
jar 'org.kill-bill.billing:killbill-util:tests', '0.
|
1
|
+
jar 'org.kill-bill.billing:killbill-api', '0.9.2'
|
2
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.7.0'
|
3
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.7.0'
|
4
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.7.0'
|
5
|
+
jar 'org.kill-bill.billing:killbill-util:tests', '0.11.1'
|
6
6
|
jar 'javax.servlet:javax.servlet-api', '3.0.1'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.8.0
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.rdoc_options << '--exclude' << '.'
|
24
24
|
|
25
25
|
|
26
|
-
s.add_dependency 'killbill', '~> 3.
|
26
|
+
s.add_dependency 'killbill', '~> 3.1.0'
|
27
27
|
|
28
28
|
s.add_development_dependency 'jbundler', '~> 0.4.1'
|
29
29
|
s.add_development_dependency 'rake', '>= 10.0.0'
|
data/lib/payment_test/api.rb
CHANGED
@@ -18,7 +18,7 @@ module PaymentTest
|
|
18
18
|
def get_name
|
19
19
|
end
|
20
20
|
|
21
|
-
def process_payment(kb_account_id, kb_payment_id, kb_payment_method_id, amount, currency,
|
21
|
+
def process_payment(kb_account_id, kb_payment_id, kb_payment_method_id, amount, currency, properties, context)
|
22
22
|
# Make an API call from the payment call
|
23
23
|
account = @kb_apis.account_user_api.get_account_by_id(kb_account_id, @kb_apis.create_context)
|
24
24
|
res = Killbill::Plugin::Model::PaymentInfoPlugin.new
|
@@ -31,7 +31,7 @@ module PaymentTest
|
|
31
31
|
res
|
32
32
|
end
|
33
33
|
|
34
|
-
def get_payment_info(kb_account_id, kb_payment_id,
|
34
|
+
def get_payment_info(kb_account_id, kb_payment_id, properties, context)
|
35
35
|
res = Killbill::Plugin::Model::PaymentInfoPlugin.new
|
36
36
|
res.amount= 0
|
37
37
|
res.created_date= DateTime.now
|
@@ -42,9 +42,9 @@ module PaymentTest
|
|
42
42
|
res
|
43
43
|
end
|
44
44
|
|
45
|
-
def process_refund(kb_account_id, kb_payment_id,
|
45
|
+
def process_refund(kb_account_id, kb_payment_id, refund_amount, currency, properties, context)
|
46
46
|
res = Killbill::Plugin::Model::RefundInfoPlugin.new
|
47
|
-
res.amount=
|
47
|
+
res.amount= refund_amount
|
48
48
|
res.created_date= DateTime.now
|
49
49
|
res.effective_date=DateTime.now
|
50
50
|
res.status=:PROCESSED
|
@@ -53,7 +53,7 @@ module PaymentTest
|
|
53
53
|
res
|
54
54
|
end
|
55
55
|
|
56
|
-
def get_refund_info(kb_account_id, kb_payment_id,
|
56
|
+
def get_refund_info(kb_account_id, kb_payment_id, properties, context)
|
57
57
|
res = Killbill::Plugin::Model::RefundInfoPlugin.new
|
58
58
|
res.amount= 0
|
59
59
|
res.created_date= DateTime.now
|
@@ -64,14 +64,14 @@ module PaymentTest
|
|
64
64
|
res
|
65
65
|
end
|
66
66
|
|
67
|
-
def add_payment_method(kb_account_id, kb_payment_method_id, payment_method_props, set_default,
|
67
|
+
def add_payment_method(kb_account_id, kb_payment_method_id, payment_method_props, set_default, properties, context)
|
68
68
|
nil
|
69
69
|
end
|
70
70
|
|
71
|
-
def delete_payment_method(kb_account_id, kb_payment_method_id,
|
71
|
+
def delete_payment_method(kb_account_id, kb_payment_method_id, properties, context)
|
72
72
|
end
|
73
73
|
|
74
|
-
def get_payment_method_detail(kb_account_id, kb_payment_method_id,
|
74
|
+
def get_payment_method_detail(kb_account_id, kb_payment_method_id, properties, context)
|
75
75
|
res = Killbill::Plugin::Model::PaymentMethodPlugin.new
|
76
76
|
res.kb_payment_method_id="9e3ff858-809d-4d12-a1fa-da789e0841d"
|
77
77
|
res.external_payment_method_id="external_payment_method_id"
|
@@ -88,11 +88,11 @@ module PaymentTest
|
|
88
88
|
res.zip="zip"
|
89
89
|
res.country="country"
|
90
90
|
properties = []
|
91
|
-
prop1 = Killbill::Plugin::Model::
|
91
|
+
prop1 = Killbill::Plugin::Model::PluginProperty.new
|
92
92
|
prop1.key = "key1"
|
93
93
|
prop1.value = "value1"
|
94
94
|
properties << prop1
|
95
|
-
prop2 = Killbill::Plugin::Model::
|
95
|
+
prop2 = Killbill::Plugin::Model::PluginProperty.new
|
96
96
|
prop2.key = "key2"
|
97
97
|
prop2.value = "value2"
|
98
98
|
properties << prop2
|
@@ -100,10 +100,10 @@ module PaymentTest
|
|
100
100
|
res
|
101
101
|
end
|
102
102
|
|
103
|
-
def set_default_payment_method(kb_account_id, kb_payment_method_id,
|
103
|
+
def set_default_payment_method(kb_account_id, kb_payment_method_id, properties, context)
|
104
104
|
end
|
105
105
|
|
106
|
-
def get_payment_methods(kb_account_id, refresh_from_gateway,
|
106
|
+
def get_payment_methods(kb_account_id, refresh_from_gateway, properties, context)
|
107
107
|
res = Killbill::Plugin::Model::PaymentMethodInfoPlugin.new
|
108
108
|
res.account_id=kb_account_id
|
109
109
|
res.payment_method_id=kb_account_id
|
@@ -112,11 +112,11 @@ module PaymentTest
|
|
112
112
|
[res]
|
113
113
|
end
|
114
114
|
|
115
|
-
def search_payment_methods(search_key,
|
116
|
-
[get_payment_method_detail(nil, nil, nil)]
|
115
|
+
def search_payment_methods(search_key, offset, limit, properties, context)
|
116
|
+
[get_payment_method_detail(nil, nil, nil, nil)]
|
117
117
|
end
|
118
118
|
|
119
|
-
def reset_payment_methods(kb_account_id, payment_methods)
|
119
|
+
def reset_payment_methods(kb_account_id, payment_methods, properties)
|
120
120
|
end
|
121
121
|
|
122
122
|
def raise_exception_on_next_calls
|
data/pom.xml
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
<groupId>org.kill-bill.billing.plugin.ruby</groupId>
|
26
26
|
<artifactId>payment-test-plugin</artifactId>
|
27
27
|
<packaging>pom</packaging>
|
28
|
-
<version>1.
|
28
|
+
<version>1.8.0</version>
|
29
29
|
<name>payment-test-plugin</name>
|
30
30
|
<description></description>
|
31
31
|
<scm>
|
@@ -38,7 +38,7 @@ describe PaymentTest::PaymentPlugin do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
it "should test charge" do
|
41
|
-
output = @plugin.process_payment(@kb_account_id, @kb_payment_id, @kb_payment_method_id, @amount_in_cents, @currency, @call_context)
|
41
|
+
output = @plugin.process_payment(@kb_account_id, @kb_payment_id, @kb_payment_method_id, @amount_in_cents, @currency, nil, @call_context)
|
42
42
|
|
43
43
|
output.should be_an_instance_of Killbill::Plugin::Model::PaymentInfoPlugin
|
44
44
|
output.amount.should == @amount_in_cents
|
@@ -46,6 +46,6 @@ describe PaymentTest::PaymentPlugin do
|
|
46
46
|
end
|
47
47
|
|
48
48
|
it "should test search" do
|
49
|
-
@plugin.search_payment_methods("blah", @call_context).size.should == 1
|
49
|
+
@plugin.search_payment_methods("blah", 0, 100, nil, @call_context).size.should == 1
|
50
50
|
end
|
51
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: killbill-payment-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kill Bill core team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: killbill
|
@@ -16,12 +16,12 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
19
|
+
version: 3.1.0
|
20
20
|
requirement: !ruby/object:Gem::Requirement
|
21
21
|
requirements:
|
22
22
|
- - ~>
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: 3.
|
24
|
+
version: 3.1.0
|
25
25
|
prerelease: false
|
26
26
|
type: :runtime
|
27
27
|
- !ruby/object:Gem::Dependency
|