killbill-stripe 0.2.3 → 1.0.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/.gitignore +4 -5
- data/.travis.yml +22 -5
- data/Gemfile +1 -1
- data/Gemfile.head +5 -0
- data/Gemfile.lock +49 -54
- data/Jarfile +9 -9
- data/Jarfile.lock +35 -29
- data/LICENSE +2 -2
- data/README.md +61 -28
- data/VERSION +1 -1
- data/db/ddl.sql +4 -4
- data/db/schema.rb +9 -9
- data/killbill-stripe.gemspec +17 -15
- data/lib/stripe.rb +0 -1
- data/lib/stripe/api.rb +16 -0
- data/lib/stripe/application.rb +14 -19
- data/lib/stripe/models/payment_method.rb +6 -3
- data/lib/stripe/private_api.rb +6 -28
- data/lib/stripe/views/stripejs.erb +7 -2
- data/pom.xml +2 -2
- data/release.sh +34 -14
- data/spec/stripe/base_plugin_spec.rb +13 -11
- data/spec/stripe/remote/integration_spec.rb +11 -19
- data/stripe.yml +18 -10
- metadata +61 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a469dd32bd4ca451cf25b95945d523bd2543c04
|
4
|
+
data.tar.gz: 8e62207b284afc8d78c030688fdd982568296bfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54d9cd618ecb40a38708cd9706b9880ed22a1f457b3ffe8d5835d830b1fe1d5fa4877198b70371f23aaa0254df3970676cae7eb582f1d35d61dcfc24340d3846
|
7
|
+
data.tar.gz: 68cdfe040ca1552a8361ebe13c80e9b980a2dc6c75167966d2b5b34103dcc74fe317fde6bb32e13fe2db9d3c72e821c243ed93cd7ce65ba9d88222d27757c472
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,21 +1,38 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
|
+
sudo: false
|
4
|
+
cache: bundler
|
5
|
+
|
6
|
+
script: 'bundle exec rake test:spec test:remote:spec'
|
7
|
+
|
3
8
|
notifications:
|
4
9
|
email:
|
5
10
|
- kill-bill-commits@googlegroups.com
|
6
11
|
|
12
|
+
env:
|
13
|
+
global:
|
14
|
+
- JRUBY_OPTS='-J-Xmx1024M'
|
15
|
+
|
7
16
|
rvm:
|
8
|
-
- jruby-
|
17
|
+
- jruby-1.7.20
|
18
|
+
- jruby-20mode # latest 1.7.x
|
9
19
|
- jruby-head
|
10
20
|
|
21
|
+
gemfile:
|
22
|
+
- Gemfile
|
23
|
+
- Gemfile.head
|
24
|
+
|
11
25
|
jdk:
|
12
|
-
- openjdk6
|
13
26
|
- openjdk7
|
14
27
|
- oraclejdk7
|
28
|
+
- oraclejdk8
|
15
29
|
|
16
30
|
matrix:
|
17
31
|
allow_failures:
|
18
32
|
- rvm: jruby-head
|
19
|
-
|
20
|
-
-
|
21
|
-
|
33
|
+
- jdk: oraclejdk8
|
34
|
+
- gemfile: Gemfile.head
|
35
|
+
fast_finish: true
|
36
|
+
|
37
|
+
after_success:
|
38
|
+
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && echo "<settings><servers><server><id>sonatype-nexus-snapshots</id><username>\${env.OSSRH_USER}</username><password>\${env.OSSRH_PASS}</password></server></servers></settings>" > ~/settings.xml && MVN="mvn --settings $HOME/settings.xml" NO_RELEASE=1 travis_retry travis_wait bash release.sh | egrep -v "Download|Install|Upload" ; rm -f ~/settings.xml'
|
data/Gemfile
CHANGED
data/Gemfile.head
ADDED
data/Gemfile.lock
CHANGED
@@ -1,60 +1,53 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
killbill-stripe (0.
|
4
|
+
killbill-stripe (1.0.0)
|
5
5
|
actionpack (~> 4.1.0)
|
6
6
|
actionview (~> 4.1.0)
|
7
|
-
activemerchant (~> 1.
|
7
|
+
activemerchant (~> 1.48.0)
|
8
8
|
activerecord (~> 4.1.0)
|
9
|
-
activerecord-
|
10
|
-
|
11
|
-
jruby-openssl (~> 0.9.
|
12
|
-
killbill (~>
|
13
|
-
monetize (~>
|
14
|
-
money (~> 6.
|
15
|
-
offsite_payments (~> 2.0
|
9
|
+
activerecord-bogacs (~> 0.3)
|
10
|
+
activerecord-jdbc-adapter (~> 1.3)
|
11
|
+
jruby-openssl (~> 0.9.6)
|
12
|
+
killbill (~> 4.0.0)
|
13
|
+
monetize (~> 1.1.0)
|
14
|
+
money (~> 6.5.1)
|
15
|
+
offsite_payments (~> 2.1.0)
|
16
16
|
sinatra (~> 1.3.4)
|
17
17
|
thread_safe (~> 0.3.4)
|
18
18
|
|
19
19
|
GEM
|
20
|
-
remote:
|
20
|
+
remote: https://rubygems.org/
|
21
21
|
specs:
|
22
|
-
actionpack (4.1.
|
23
|
-
actionview (= 4.1.
|
24
|
-
activesupport (= 4.1.
|
22
|
+
actionpack (4.1.10)
|
23
|
+
actionview (= 4.1.10)
|
24
|
+
activesupport (= 4.1.10)
|
25
25
|
rack (~> 1.5.2)
|
26
26
|
rack-test (~> 0.6.2)
|
27
|
-
actionview (4.1.
|
28
|
-
activesupport (= 4.1.
|
27
|
+
actionview (4.1.10)
|
28
|
+
activesupport (= 4.1.10)
|
29
29
|
builder (~> 3.1)
|
30
30
|
erubis (~> 2.7.0)
|
31
|
-
active_utils (
|
32
|
-
activesupport (>=
|
31
|
+
active_utils (3.0.0)
|
32
|
+
activesupport (>= 3.2)
|
33
33
|
i18n
|
34
|
-
activemerchant (1.
|
35
|
-
active_utils (~> 2.2.0)
|
34
|
+
activemerchant (1.48.0)
|
36
35
|
activesupport (>= 3.2.14, < 5.0.0)
|
37
36
|
builder (>= 2.1.2, < 4.0.0)
|
38
37
|
i18n (>= 0.6.9)
|
39
|
-
json (~> 1.7)
|
40
38
|
nokogiri (~> 1.4)
|
41
|
-
|
42
|
-
|
43
|
-
activesupport (= 4.1.8)
|
39
|
+
activemodel (4.1.10)
|
40
|
+
activesupport (= 4.1.10)
|
44
41
|
builder (~> 3.1)
|
45
|
-
activerecord (4.1.
|
46
|
-
activemodel (= 4.1.
|
47
|
-
activesupport (= 4.1.
|
42
|
+
activerecord (4.1.10)
|
43
|
+
activemodel (= 4.1.10)
|
44
|
+
activesupport (= 4.1.10)
|
48
45
|
arel (~> 5.0.0)
|
49
|
-
activerecord-
|
46
|
+
activerecord-bogacs (0.3.0)
|
47
|
+
thread_safe (~> 0.3)
|
48
|
+
activerecord-jdbc-adapter (1.3.16)
|
50
49
|
activerecord (>= 2.2)
|
51
|
-
|
52
|
-
activerecord-jdbc-adapter (~> 1.3.13)
|
53
|
-
jdbc-mysql (>= 5.1.22)
|
54
|
-
activerecord-jdbcsqlite3-adapter (1.3.13)
|
55
|
-
activerecord-jdbc-adapter (~> 1.3.13)
|
56
|
-
jdbc-sqlite3 (>= 3.7.2, < 3.9)
|
57
|
-
activesupport (4.1.8)
|
50
|
+
activesupport (4.1.10)
|
58
51
|
i18n (~> 0.6, >= 0.6.9)
|
59
52
|
json (~> 1.7, >= 1.7.7)
|
60
53
|
minitest (~> 5.1)
|
@@ -66,35 +59,36 @@ GEM
|
|
66
59
|
erubis (2.7.0)
|
67
60
|
ethon (0.7.3)
|
68
61
|
ffi (>= 1.3.0)
|
69
|
-
ffi (1.9.
|
70
|
-
i18n (0.
|
62
|
+
ffi (1.9.8-java)
|
63
|
+
i18n (0.7.0)
|
71
64
|
jbundler (0.4.3)
|
72
65
|
maven-tools (~> 0.32.1)
|
73
66
|
ruby-maven (~> 3.0.4)
|
74
|
-
jdbc-
|
67
|
+
jdbc-mariadb (1.1.8)
|
75
68
|
jdbc-sqlite3 (3.8.7)
|
76
|
-
jruby-openssl (0.9.
|
69
|
+
jruby-openssl (0.9.7-java)
|
77
70
|
json (1.8.2-java)
|
78
|
-
killbill (
|
71
|
+
killbill (4.0.0)
|
72
|
+
rack (>= 1.5.2)
|
79
73
|
sinatra (~> 1.3.4)
|
80
74
|
typhoeus (~> 0.6.9)
|
81
|
-
tzinfo (~> 1.
|
75
|
+
tzinfo (~> 1.2.0)
|
82
76
|
maven-tools (0.32.5)
|
83
|
-
minitest (5.
|
84
|
-
monetize (
|
85
|
-
money (~> 6.
|
86
|
-
money (6.
|
87
|
-
i18n (
|
77
|
+
minitest (5.6.1)
|
78
|
+
monetize (1.1.0)
|
79
|
+
money (~> 6.5.0)
|
80
|
+
money (6.5.1)
|
81
|
+
i18n (>= 0.6.4, <= 0.7.0)
|
88
82
|
nokogiri (1.6.6.2-java)
|
89
|
-
offsite_payments (2.0
|
90
|
-
|
83
|
+
offsite_payments (2.1.0)
|
84
|
+
actionpack (>= 3.2.20, < 5.0.0)
|
85
|
+
active_utils (~> 3.0.0)
|
91
86
|
activesupport (>= 3.2.14, < 5.0.0)
|
92
87
|
builder (>= 2.1.2, < 4.0.0)
|
93
88
|
i18n (~> 0.5)
|
94
|
-
|
95
|
-
money (< 7.0.0)
|
89
|
+
money (>= 5.0.0, < 7.0.0)
|
96
90
|
nokogiri (~> 1.4)
|
97
|
-
rack (1.5.
|
91
|
+
rack (1.5.3)
|
98
92
|
rack-protection (1.5.3)
|
99
93
|
rack
|
100
94
|
rack-test (0.6.3)
|
@@ -116,19 +110,20 @@ GEM
|
|
116
110
|
rack-protection (~> 1.3)
|
117
111
|
tilt (~> 1.3, >= 1.3.3)
|
118
112
|
thor (0.19.1)
|
119
|
-
thread_safe (0.3.
|
113
|
+
thread_safe (0.3.5-java)
|
120
114
|
tilt (1.4.1)
|
121
115
|
typhoeus (0.6.9)
|
122
116
|
ethon (>= 0.7.1)
|
123
|
-
tzinfo (1.
|
117
|
+
tzinfo (1.2.2)
|
124
118
|
thread_safe (~> 0.1)
|
125
119
|
|
126
120
|
PLATFORMS
|
127
121
|
java
|
128
122
|
|
129
123
|
DEPENDENCIES
|
130
|
-
|
131
|
-
|
124
|
+
jbundler (~> 0.4.3)
|
125
|
+
jdbc-mariadb (~> 1.1)
|
126
|
+
jdbc-sqlite3 (~> 3.7)
|
132
127
|
killbill-stripe!
|
133
128
|
rake (>= 10.0.0)
|
134
129
|
rspec (~> 2.12.0)
|
data/Jarfile
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
jar 'org.kill-bill.billing:killbill-api', '0.
|
2
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-
|
3
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-
|
4
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-
|
5
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-
|
6
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-
|
7
|
-
jar 'org.kill-bill.billing:killbill-util:tests', '0.13.
|
8
|
-
jar 'org.mockito:mockito-all', '1.
|
9
|
-
jar 'javax.servlet:javax.servlet-api', '3.0
|
1
|
+
jar 'org.kill-bill.billing:killbill-api', '0.14'
|
2
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.9'
|
3
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-invoice', '0.9'
|
4
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.9'
|
5
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.9'
|
6
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-routing', '0.9'
|
7
|
+
jar 'org.kill-bill.billing:killbill-util:tests', '0.13.7'
|
8
|
+
jar 'org.mockito:mockito-all', '1.10.19'
|
9
|
+
jar 'javax.servlet:javax.servlet-api', '3.1.0'
|
data/Jarfile.lock
CHANGED
@@ -1,21 +1,20 @@
|
|
1
|
-
org.kill-bill.billing:killbill-api:jar:0.
|
1
|
+
org.kill-bill.billing:killbill-api:jar:0.14
|
2
2
|
com.fasterxml.jackson.core:jackson-annotations:jar:2.4.3
|
3
3
|
joda-time:joda-time:jar:2.3
|
4
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-
|
5
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-
|
6
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-
|
7
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-
|
8
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-
|
9
|
-
org.kill-bill.billing:killbill-util:jar:tests:0.13.
|
10
|
-
com.codahale.metrics:metrics-core:jar:3.0.2
|
4
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-currency:jar:0.9
|
5
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-invoice:jar:0.9
|
6
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-notification:jar:0.9
|
7
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-payment:jar:0.9
|
8
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-routing:jar:0.9
|
9
|
+
org.kill-bill.billing:killbill-util:jar:tests:0.13.7
|
11
10
|
com.fasterxml.jackson.core:jackson-databind:jar:2.4.3
|
12
11
|
com.fasterxml.jackson.core:jackson-core:jar:2.4.3
|
13
12
|
com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.4.3
|
14
13
|
com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.4.3
|
15
|
-
com.jolbox:bonecp:jar:0.8.0-rc3
|
16
|
-
com.google.guava:guava:jar:15.0
|
17
14
|
com.samskivert:jmustache:jar:1.5
|
18
|
-
|
15
|
+
io.dropwizard.metrics:metrics-core:jar:3.1.1
|
16
|
+
io.dropwizard.metrics:metrics-ehcache:jar:3.1.1
|
17
|
+
net.sf.ehcache:ehcache:jar:2.9.1
|
19
18
|
org.antlr:stringtemplate:jar:3.2.1
|
20
19
|
antlr:antlr:jar:2.7.7
|
21
20
|
org.apache.commons:commons-email:jar:1.2
|
@@ -23,30 +22,37 @@ javax.mail:mail:jar:1.4.1
|
|
23
22
|
javax.activation:activation:jar:1.1
|
24
23
|
org.apache.shiro:shiro-core:jar:1.2.3
|
25
24
|
commons-beanutils:commons-beanutils:jar:1.8.3
|
25
|
+
commons-logging:commons-logging:jar:1.1.1
|
26
26
|
org.apache.shiro:shiro-ehcache:jar:1.2.3
|
27
|
+
net.sf.ehcache:ehcache-core:jar:2.5.0
|
27
28
|
org.apache.shiro:shiro-guice:jar:1.2.3
|
29
|
+
com.google.guava:guava:jar:r09
|
28
30
|
com.google.inject:guice:jar:3.0
|
29
31
|
aopalliance:aopalliance:jar:1.0
|
30
32
|
com.google.inject.extensions:guice-multibindings:jar:3.0
|
31
|
-
org.jdbi:jdbi:jar:2.
|
32
|
-
com.google.code.findbugs:annotations:jar:2.0.2
|
33
|
+
org.jdbi:jdbi:jar:2.62
|
33
34
|
org.joda:joda-money:jar:0.9
|
34
|
-
org.kill-bill.billing:killbill-internal-api:jar:0.13.
|
35
|
-
org.kill-bill.billing:killbill-platform-api:jar:0.
|
36
|
-
org.kill-bill.
|
37
|
-
|
38
|
-
org.
|
39
|
-
org.kill-bill.
|
40
|
-
|
35
|
+
org.kill-bill.billing:killbill-internal-api:jar:0.13.7
|
36
|
+
org.kill-bill.billing:killbill-platform-api:jar:0.2
|
37
|
+
org.kill-bill.billing:killbill-platform-base:jar:0.2
|
38
|
+
com.google.code.findbugs:annotations:jar:3.0.0
|
39
|
+
org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:jar:1.16
|
40
|
+
org.kill-bill.billing:killbill-platform-osgi-api:jar:0.2
|
41
|
+
org.osgi:org.osgi.core:jar:5.0.0
|
42
|
+
org.kill-bill.commons:killbill-clock:jar:0.3
|
43
|
+
org.kill-bill.commons:killbill-concurrent:jar:0.3
|
44
|
+
org.kill-bill.commons:killbill-embeddeddb-common:jar:0.3
|
45
|
+
org.kill-bill.commons:killbill-jdbi:jar:0.3
|
46
|
+
com.h2database:h2:jar:1.4.186
|
41
47
|
javax.inject:javax.inject:jar:1
|
42
|
-
org.kill-bill.commons:killbill-locker:jar:0.
|
43
|
-
org.kill-bill.commons:killbill-queue:jar:0.
|
44
|
-
org.kill-bill.commons:killbill-xmlloader:jar:0.
|
48
|
+
org.kill-bill.commons:killbill-locker:jar:0.3
|
49
|
+
org.kill-bill.commons:killbill-queue:jar:0.3
|
50
|
+
org.kill-bill.commons:killbill-xmlloader:jar:0.3
|
45
51
|
org.skife.config:config-magic:jar:0.14
|
46
|
-
org.slf4j:jcl-over-slf4j:jar:1.7.
|
47
|
-
org.slf4j:slf4j-api:jar:1.7.
|
52
|
+
org.slf4j:jcl-over-slf4j:jar:1.7.12
|
53
|
+
org.slf4j:slf4j-api:jar:1.7.12
|
48
54
|
org.weakref:jmxutils:jar:1.12
|
49
|
-
org.mockito:mockito-all:jar:1.
|
50
|
-
javax.servlet:javax.servlet-api:jar:3.0
|
51
|
-
org.bouncycastle:bcpkix-jdk15on:jar:1.
|
52
|
-
org.bouncycastle:bcprov-jdk15on:jar:1.
|
55
|
+
org.mockito:mockito-all:jar:1.10.19
|
56
|
+
javax.servlet:javax.servlet-api:jar:3.1.0
|
57
|
+
org.bouncycastle:bcpkix-jdk15on:jar:1.50
|
58
|
+
org.bouncycastle:bcprov-jdk15on:jar:1.50
|
data/LICENSE
CHANGED
@@ -186,7 +186,7 @@ Apache License
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
187
187
|
identification within third-party archives.
|
188
188
|
|
189
|
-
Copyright 2014 The Billing Project, LLC
|
189
|
+
Copyright 2014-2015 The Billing Project, LLC
|
190
190
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
192
192
|
you may not use this file except in compliance with the License.
|
@@ -198,4 +198,4 @@ Apache License
|
|
198
198
|
distributed under the License is distributed on an "AS IS" BASIS,
|
199
199
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
200
|
See the License for the specific language governing permissions and
|
201
|
-
limitations under the License.
|
201
|
+
limitations under the License.
|
data/README.md
CHANGED
@@ -5,43 +5,76 @@ Plugin to use [Stripe](https://stripe.com/) as a gateway.
|
|
5
5
|
|
6
6
|
Release builds are available on [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.kill-bill.billing.plugin.ruby%22%20AND%20a%3A%22stripe-plugin%22) with coordinates `org.kill-bill.billing.plugin.ruby:stripe-plugin`.
|
7
7
|
|
8
|
+
Kill Bill compatibility
|
9
|
+
-----------------------
|
10
|
+
|
11
|
+
| Plugin version | Kill Bill version | Stripe version |
|
12
|
+
| -------------: | ----------------: | --------------------------------------------------------: |
|
13
|
+
| 1.0.y | 0.14.z | [2015-02-18](https://stripe.com/docs/upgrades#2015-02-18) |
|
14
|
+
|
8
15
|
Requirements
|
9
16
|
------------
|
10
17
|
|
11
|
-
The plugin needs a database. The latest version of the schema can be found here
|
18
|
+
The plugin needs a database. The latest version of the schema can be found [here](https://github.com/killbill/killbill-stripe-plugin/blob/master/db/ddl.sql).
|
19
|
+
|
20
|
+
Configuration
|
21
|
+
-------------
|
12
22
|
|
13
|
-
|
14
|
-
|
23
|
+
```
|
24
|
+
curl -v \
|
25
|
+
-X POST \
|
26
|
+
-u admin:password \
|
27
|
+
-H 'X-Killbill-ApiKey: bob' \
|
28
|
+
-H 'X-Killbill-ApiSecret: lazar' \
|
29
|
+
-H 'X-Killbill-CreatedBy: admin' \
|
30
|
+
-H 'Content-Type: text/plain' \
|
31
|
+
-d ':stripe:
|
32
|
+
:api_secret_key: "your-secret-key"
|
33
|
+
:api_publishable_key: "your-publishable-key"' \
|
34
|
+
http://127.0.0.1:8080/1.0/kb/tenants/uploadPluginConfig/killbill-stripe
|
35
|
+
```
|
15
36
|
|
16
|
-
|
17
|
-
2. Go to [stripe.com](http://stripe.com/) and create an account. This account will be used as a sandbox environment for testing.
|
18
|
-
3. In your Stripe account, click on **Your Account** (top right), then click on **Account Settings** and then on the **API Keys** tab. Write down your keys.
|
19
|
-
4. Create a stripe.yml file under killbill-stripe-plugin with the following:
|
37
|
+
To get your credentials:
|
20
38
|
|
21
|
-
|
22
|
-
|
23
|
-
:api_secret_key: 'sk_test_AAABBBCCC'
|
24
|
-
:api_publishable_key: 'pk_test_DDDEEEFFF'
|
25
|
-
:log_file: '/var/tmp/stripe.log'
|
26
|
-
:test: true
|
27
|
-
:database:
|
28
|
-
:adapter: sqlite3
|
29
|
-
:database: test.db
|
30
|
-
```
|
39
|
+
1. Go to [stripe.com](http://stripe.com/) and create an account. This account will be used as a sandbox environment for testing.
|
40
|
+
2. In your Stripe account, click on **Your Account** (top right), then click on **Account Settings** and then on the **API Keys** tab. Write down your keys.
|
31
41
|
|
32
|
-
|
33
|
-
6. Go to your Stripe account, you should see some data (e.g. account created).
|
34
|
-
7. Congrats! You're all set!
|
42
|
+
To go to production, create a `stripe.yml` configuration file under `/var/tmp/bundles/plugins/ruby/killbill-stripe/x.y.z/` containing the following:
|
35
43
|
|
44
|
+
```
|
45
|
+
:stripe:
|
46
|
+
:test: false
|
47
|
+
```
|
36
48
|
|
37
|
-
|
49
|
+
Usage
|
38
50
|
-----
|
39
51
|
|
40
|
-
|
52
|
+
You would typically implement [Stripe.js](https://stripe.com/docs/stripe.js) to tokenize credit cards.
|
53
|
+
|
54
|
+
After receiving the token from Stripe, call:
|
55
|
+
|
56
|
+
```
|
57
|
+
curl -v \
|
58
|
+
-X POST \
|
59
|
+
-u admin:password \
|
60
|
+
-H 'X-Killbill-ApiKey: bob' \
|
61
|
+
-H 'X-Killbill-ApiSecret: lazar' \
|
62
|
+
-H 'X-Killbill-CreatedBy: admin' \
|
63
|
+
-H 'Content-Type: application/json' \
|
64
|
+
-d '{
|
65
|
+
"pluginName": "killbill-stripe",
|
66
|
+
"pluginInfo": {
|
67
|
+
"properties": [{
|
68
|
+
"key": "token",
|
69
|
+
"value": "tok_20G53990M6953444J"
|
70
|
+
}]
|
71
|
+
}
|
72
|
+
}' \
|
73
|
+
"http://127.0.0.1:8080/1.0/kb/accounts/2a55045a-ce1d-4344-942d-b825536328f9/paymentMethods?isDefault=true"
|
74
|
+
```
|
75
|
+
|
76
|
+
An example implementation is exposed at:
|
41
77
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
rake killbill:clean
|
46
|
-
rake build
|
47
|
-
rake killbill:package
|
78
|
+
```
|
79
|
+
http://127.0.0.1:8080/plugins/killbill-stripe?kb_account_id=2a55045a-ce1d-4344-942d-b825536328f9&kb_tenant_id=a86d9fd1-718d-4178-a9eb-46c61aa2548f
|
80
|
+
```
|