killbill-litle 1.0.10 → 1.0.11
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.
- data/README.md +24 -0
- data/VERSION +1 -1
- data/killbill-litle.gemspec +4 -4
- data/lib/litle/api.rb +1 -1
- data/lib/litle/models/litle_payment_method.rb +10 -1
- data/pom.xml +10 -1
- metadata +7 -7
data/README.md
CHANGED
@@ -11,6 +11,30 @@ Requirements
|
|
11
11
|
|
12
12
|
The plugin needs a database. The latest version of the schema can be found here: https://raw.github.com/killbill/killbill-litle-plugin/master/db/ddl.sql.
|
13
13
|
|
14
|
+
Usage
|
15
|
+
-----
|
16
|
+
|
17
|
+
Go to http://$HOST:8080/plugins/killbill-litle?kb_account_id=13d26090-b8d7-11e2-9e96-0800200c9a66 and enter your credit card information.
|
18
|
+
|
19
|
+
Then, save the token in Kill Bill:
|
20
|
+
|
21
|
+
```
|
22
|
+
curl -v \
|
23
|
+
-X POST \
|
24
|
+
-H "Content-Type: application/json" \
|
25
|
+
-H "X-Killbill-CreatedBy: Web server" \
|
26
|
+
-H "X-Killbill-Reason: New account" \
|
27
|
+
--data-binary '{
|
28
|
+
"pluginName": "killbill-litle",
|
29
|
+
"pluginInfo": {
|
30
|
+
"properties": [{
|
31
|
+
"key": "paypageRegistrationId",
|
32
|
+
"value": "t3GER3BP3JHLASZe"
|
33
|
+
}]
|
34
|
+
}
|
35
|
+
}' \
|
36
|
+
"http://$HOST:8080/1.0/kb/accounts/13d26090-b8d7-11e2-9e96-0800200c9a66/paymentMethods?isDefault=true"
|
37
|
+
```
|
14
38
|
|
15
39
|
Configuration
|
16
40
|
-------------
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.11
|
data/killbill-litle.gemspec
CHANGED
@@ -4,15 +4,15 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.name = 'killbill-litle'
|
5
5
|
s.version = version
|
6
6
|
s.summary = 'Plugin to use Litle & Co. as a gateway.'
|
7
|
-
s.description = '
|
7
|
+
s.description = 'Kill Bill payment plugin for Litle & Co.'
|
8
8
|
|
9
9
|
s.required_ruby_version = '>= 1.9.3'
|
10
10
|
|
11
11
|
s.license = 'Apache License (2.0)'
|
12
12
|
|
13
|
-
s.author = '
|
13
|
+
s.author = 'Kill Bill core team'
|
14
14
|
s.email = 'killbilling-users@googlegroups.com'
|
15
|
-
s.homepage = 'http://
|
15
|
+
s.homepage = 'http://kill-bill.org'
|
16
16
|
|
17
17
|
s.files = `git ls-files`.split("\n")
|
18
18
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.rdoc_options << '--exclude' << '.'
|
24
24
|
|
25
|
-
s.add_dependency 'killbill', '~> 1.0.
|
25
|
+
s.add_dependency 'killbill', '~> 1.0.18'
|
26
26
|
s.add_dependency 'activemerchant', '~> 2.0.0'
|
27
27
|
s.add_dependency 'activerecord', '~> 3.2.1'
|
28
28
|
s.add_dependency 'sinatra', '~> 1.3.4'
|
data/lib/litle/api.rb
CHANGED
@@ -95,7 +95,7 @@ module Killbill::Litle
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def get_payment_methods(kb_account_id, refresh_from_gateway, call_context, options = {})
|
98
|
-
LitlePaymentMethod.from_kb_account_id(kb_account_id.to_s).collect { |pm| pm.
|
98
|
+
LitlePaymentMethod.from_kb_account_id(kb_account_id.to_s).collect { |pm| pm.to_payment_method_info_response }
|
99
99
|
end
|
100
100
|
|
101
101
|
def reset_payment_methods(kb_account_id, payment_methods)
|
@@ -23,10 +23,19 @@ module Killbill::Litle
|
|
23
23
|
external_payment_method_id = litle_token
|
24
24
|
# No concept of default payment method in Litle
|
25
25
|
is_default = false
|
26
|
-
|
26
|
+
|
27
27
|
properties = []
|
28
|
+
properties << Killbill::Plugin::Model::PaymentMethodKVInfo.new(false, "token", litle_token)
|
28
29
|
|
29
30
|
Killbill::Plugin::Model::PaymentMethodPlugin.new(external_payment_method_id, is_default, properties, "CreditCard", nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil)
|
30
31
|
end
|
32
|
+
|
33
|
+
def to_payment_method_info_response
|
34
|
+
external_payment_method_id = litle_token
|
35
|
+
# No concept of default payment method in Litle
|
36
|
+
is_default = false
|
37
|
+
|
38
|
+
Killbill::Plugin::Model::PaymentMethodInfoPlugin.new(kb_account_id, kb_payment_method_id, is_default, external_payment_method_id)
|
39
|
+
end
|
31
40
|
end
|
32
41
|
end
|
data/pom.xml
CHANGED
@@ -25,8 +25,17 @@
|
|
25
25
|
<groupId>com.ning.killbill.ruby</groupId>
|
26
26
|
<artifactId>litle-plugin</artifactId>
|
27
27
|
<packaging>pom</packaging>
|
28
|
-
<version>1.0.
|
28
|
+
<version>1.0.11</version>
|
29
29
|
<name>litle-plugin</name>
|
30
|
+
<url>http://github.com/killbill/killbill-litle-plugin</url>
|
31
|
+
<description>Plugin for accessing Litle as a payment gateway</description>
|
32
|
+
<licenses>
|
33
|
+
<license>
|
34
|
+
<name>Apache License 2.0</name>
|
35
|
+
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
36
|
+
<distribution>repo</distribution>
|
37
|
+
</license>
|
38
|
+
</licenses>
|
30
39
|
<scm>
|
31
40
|
<connection>scm:git:git://github.com/killbill/killbill-litle-plugin.git</connection>
|
32
41
|
<url>https://github.com/killbill/killbill-litle-plugin/</url>
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: killbill-litle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
-
-
|
8
|
+
- Kill Bill core team
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: killbill
|
@@ -17,13 +17,13 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.0.
|
20
|
+
version: 1.0.18
|
21
21
|
none: false
|
22
22
|
requirement: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0.
|
26
|
+
version: 1.0.18
|
27
27
|
none: false
|
28
28
|
prerelease: false
|
29
29
|
type: :runtime
|
@@ -203,7 +203,7 @@ dependencies:
|
|
203
203
|
none: false
|
204
204
|
prerelease: false
|
205
205
|
type: :development
|
206
|
-
description:
|
206
|
+
description: Kill Bill payment plugin for Litle & Co.
|
207
207
|
email: killbilling-users@googlegroups.com
|
208
208
|
executables: []
|
209
209
|
extensions: []
|
@@ -239,7 +239,7 @@ files:
|
|
239
239
|
- spec/litle/integration_spec.rb
|
240
240
|
- spec/litle/utils_spec.rb
|
241
241
|
- spec/spec_helper.rb
|
242
|
-
homepage: http://
|
242
|
+
homepage: http://kill-bill.org
|
243
243
|
licenses:
|
244
244
|
- Apache License (2.0)
|
245
245
|
post_install_message:
|