killbill-cybersource 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1afabdf22905f7fad77d239026e4a3182831b7d5
4
- data.tar.gz: eee1798b1e2bf264a2bd96023076755f24aa8929
3
+ metadata.gz: d96b3cde985847f615dfb6827472f74fa18286f9
4
+ data.tar.gz: 7061ae8a789e1122e79109548133334695ff8f37
5
5
  SHA512:
6
- metadata.gz: ecc764a9caa40931a26495c1d4122b71c80a0467ae97c42ab25b3d83b4b04427409792e63d6c2e0148ca3e042b7d6dffc19113eaeff9aefc928b315b13ff2a63
7
- data.tar.gz: 7a251ccb11d31b1a127ec6de804a8c4c22b672c23b9a09cb358ea5c4200ad2c64bcb477b947d565402e869ee24dcd8a99ddfe878cbc95d8ccdf825ee6ab0d576
6
+ metadata.gz: 7fbd21f7d2483df9594fddaf45249528162dc8f8ea374f94dda8ada1343edf12b1179d995d469426b2ea06e19f6c05ec61d6049249c77da5fac1be4fb27fcb4b
7
+ data.tar.gz: a3db194b14bfcf50f66ba93dec2815f12048ad008013237f1f6a9a7ea578246af78cdaa9aacbe7eaa6bdacd7eb8d8e34386337bb1f2b6ed8567b4d0810457a95
data/.gitignore CHANGED
@@ -19,18 +19,17 @@ _yardoc
19
19
  doc/
20
20
 
21
21
  .jbundler
22
- Jarfile.lock
23
- Gemfile.lock
24
22
 
25
23
  .DS_Store
26
24
 
27
- # Build directory
28
- killbill-cybersource/
29
-
30
25
  # Testing database
31
26
  test.db
32
27
 
28
+ cybersource.log
29
+
33
30
  target
34
31
  pom.xml.asc
35
32
 
36
33
  .idea/
34
+
35
+ Gemfile.head.lock
data/.travis.yml CHANGED
@@ -1,19 +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-19mode
9
- - jruby-20mode
17
+ - jruby-1.7.20
18
+ - jruby-20mode # latest 1.7.x
10
19
  - jruby-head
11
20
 
21
+ gemfile:
22
+ - Gemfile
23
+ - Gemfile.head
24
+
12
25
  jdk:
13
- - openjdk6
14
26
  - openjdk7
15
27
  - oraclejdk7
28
+ - oraclejdk8
16
29
 
17
30
  matrix:
18
31
  allow_failures:
19
32
  - rvm: jruby-head
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
@@ -1,5 +1,3 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
-
5
- #gem 'killbill', :path => '../killbill-plugin-framework-ruby'
data/Gemfile.head ADDED
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ gem 'killbill', :github => 'killbill/killbill-plugin-framework-ruby', :ref => 'HEAD'
data/Gemfile.lock ADDED
@@ -0,0 +1,129 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ killbill-cybersource (1.0.0)
5
+ actionpack (~> 4.1.0)
6
+ actionview (~> 4.1.0)
7
+ activemerchant (~> 1.48.0)
8
+ activerecord (~> 4.1.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
+ sinatra (~> 1.3.4)
17
+ thread_safe (~> 0.3.4)
18
+
19
+ GEM
20
+ remote: https://rubygems.org/
21
+ specs:
22
+ actionpack (4.1.10)
23
+ actionview (= 4.1.10)
24
+ activesupport (= 4.1.10)
25
+ rack (~> 1.5.2)
26
+ rack-test (~> 0.6.2)
27
+ actionview (4.1.10)
28
+ activesupport (= 4.1.10)
29
+ builder (~> 3.1)
30
+ erubis (~> 2.7.0)
31
+ active_utils (3.0.0)
32
+ activesupport (>= 3.2)
33
+ i18n
34
+ activemerchant (1.48.0)
35
+ activesupport (>= 3.2.14, < 5.0.0)
36
+ builder (>= 2.1.2, < 4.0.0)
37
+ i18n (>= 0.6.9)
38
+ nokogiri (~> 1.4)
39
+ activemodel (4.1.10)
40
+ activesupport (= 4.1.10)
41
+ builder (~> 3.1)
42
+ activerecord (4.1.10)
43
+ activemodel (= 4.1.10)
44
+ activesupport (= 4.1.10)
45
+ arel (~> 5.0.0)
46
+ activerecord-bogacs (0.3.0)
47
+ thread_safe (~> 0.3)
48
+ activerecord-jdbc-adapter (1.3.16)
49
+ activerecord (>= 2.2)
50
+ activesupport (4.1.10)
51
+ i18n (~> 0.6, >= 0.6.9)
52
+ json (~> 1.7, >= 1.7.7)
53
+ minitest (~> 5.1)
54
+ thread_safe (~> 0.1)
55
+ tzinfo (~> 1.1)
56
+ arel (5.0.1.20140414130214)
57
+ builder (3.2.2)
58
+ diff-lcs (1.1.3)
59
+ erubis (2.7.0)
60
+ ethon (0.7.3)
61
+ ffi (>= 1.3.0)
62
+ ffi (1.9.8-java)
63
+ i18n (0.7.0)
64
+ jbundler (0.4.3)
65
+ maven-tools (~> 0.32.1)
66
+ ruby-maven (~> 3.0.4)
67
+ jdbc-mariadb (1.1.8)
68
+ jdbc-sqlite3 (3.8.7)
69
+ jruby-openssl (0.9.7-java)
70
+ json (1.8.2-java)
71
+ killbill (4.0.0)
72
+ rack (>= 1.5.2)
73
+ sinatra (~> 1.3.4)
74
+ typhoeus (~> 0.6.9)
75
+ tzinfo (~> 1.2.0)
76
+ maven-tools (0.32.5)
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)
82
+ nokogiri (1.6.6.2-java)
83
+ offsite_payments (2.1.0)
84
+ actionpack (>= 3.2.20, < 5.0.0)
85
+ active_utils (~> 3.0.0)
86
+ activesupport (>= 3.2.14, < 5.0.0)
87
+ builder (>= 2.1.2, < 4.0.0)
88
+ i18n (~> 0.5)
89
+ money (>= 5.0.0, < 7.0.0)
90
+ nokogiri (~> 1.4)
91
+ rack (1.5.3)
92
+ rack-protection (1.5.3)
93
+ rack
94
+ rack-test (0.6.3)
95
+ rack (>= 1.0)
96
+ rake (10.4.2)
97
+ rspec (2.12.0)
98
+ rspec-core (~> 2.12.0)
99
+ rspec-expectations (~> 2.12.0)
100
+ rspec-mocks (~> 2.12.0)
101
+ rspec-core (2.12.2)
102
+ rspec-expectations (2.12.1)
103
+ diff-lcs (~> 1.1.3)
104
+ rspec-mocks (2.12.2)
105
+ ruby-maven (3.0.4.1.4)
106
+ maven-tools (~> 0.32.3)
107
+ thor (>= 0.14.6, < 2.0)
108
+ sinatra (1.3.6)
109
+ rack (~> 1.4)
110
+ rack-protection (~> 1.3)
111
+ tilt (~> 1.3, >= 1.3.3)
112
+ thor (0.19.1)
113
+ thread_safe (0.3.5-java)
114
+ tilt (1.4.1)
115
+ typhoeus (0.6.9)
116
+ ethon (>= 0.7.1)
117
+ tzinfo (1.2.2)
118
+ thread_safe (~> 0.1)
119
+
120
+ PLATFORMS
121
+ java
122
+
123
+ DEPENDENCIES
124
+ jbundler (~> 0.4.3)
125
+ jdbc-mariadb (~> 1.1)
126
+ jdbc-sqlite3 (~> 3.7)
127
+ killbill-cybersource!
128
+ rake (>= 10.0.0)
129
+ rspec (~> 2.12.0)
data/Jarfile CHANGED
@@ -1,8 +1,9 @@
1
- jar 'org.kill-bill.billing:killbill-api', '0.9.9'
2
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.7.4'
3
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.7.4'
4
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.7.4'
5
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-retry', '0.7.4'
6
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-invoice', '0.7.4'
7
- jar 'org.kill-bill.billing:killbill-util:tests', '0.11.9'
8
- jar 'javax.servlet:javax.servlet-api', '3.0.1'
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 ADDED
@@ -0,0 +1,58 @@
1
+ org.kill-bill.billing:killbill-api:jar:0.14
2
+ com.fasterxml.jackson.core:jackson-annotations:jar:2.4.3
3
+ joda-time:joda-time:jar:2.3
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
10
+ com.fasterxml.jackson.core:jackson-databind:jar:2.4.3
11
+ com.fasterxml.jackson.core:jackson-core:jar:2.4.3
12
+ com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.4.3
13
+ com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.4.3
14
+ com.samskivert:jmustache:jar:1.5
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
18
+ org.antlr:stringtemplate:jar:3.2.1
19
+ antlr:antlr:jar:2.7.7
20
+ org.apache.commons:commons-email:jar:1.2
21
+ javax.mail:mail:jar:1.4.1
22
+ javax.activation:activation:jar:1.1
23
+ org.apache.shiro:shiro-core:jar:1.2.3
24
+ commons-beanutils:commons-beanutils:jar:1.8.3
25
+ commons-logging:commons-logging:jar:1.1.1
26
+ org.apache.shiro:shiro-ehcache:jar:1.2.3
27
+ net.sf.ehcache:ehcache-core:jar:2.5.0
28
+ org.apache.shiro:shiro-guice:jar:1.2.3
29
+ com.google.guava:guava:jar:r09
30
+ com.google.inject:guice:jar:3.0
31
+ aopalliance:aopalliance:jar:1.0
32
+ com.google.inject.extensions:guice-multibindings:jar:3.0
33
+ org.jdbi:jdbi:jar:2.62
34
+ org.joda:joda-money:jar:0.9
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
47
+ javax.inject:javax.inject:jar:1
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
51
+ org.skife.config:config-magic:jar:0.14
52
+ org.slf4j:jcl-over-slf4j:jar:1.7.12
53
+ org.slf4j:slf4j-api:jar:1.7.12
54
+ org.weakref:jmxutils:jar:1.12
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/NEWS CHANGED
@@ -1,3 +1,6 @@
1
+ 1.0.0
2
+ Initial release for Kill Bill 0.14.x
3
+
1
4
  0.0.4
2
5
  Update killbill gem to 3.1.11
3
6
 
data/README.md CHANGED
@@ -1,4 +1,126 @@
1
1
  killbill-cybersource-plugin
2
2
  ===========================
3
3
 
4
- Plugin to use CyberSource as a gateway
4
+ Plugin to use [CyberSource](http://www.cybersource.com/) as a gateway.
5
+
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%22cybersource-plugin%22) with coordinates `org.kill-bill.billing.plugin.ruby:cybersource-plugin`.
7
+
8
+ Kill Bill compatibility
9
+ -----------------------
10
+
11
+ | Plugin version | Kill Bill version |
12
+ | -------------: | ----------------: |
13
+ | 1.x.y | 0.14.z |
14
+
15
+ Requirements
16
+ ------------
17
+
18
+ The plugin needs a database. The latest version of the schema can be found [here](https://github.com/killbill/killbill-cybersource-plugin/blob/master/db/ddl.sql).
19
+
20
+ Configuration
21
+ -------------
22
+
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 ':cybersource:
32
+ - :account_id: "merchant_account_1"
33
+ :login: "your-login"
34
+ :password: "your-password"
35
+ - :account_id: "merchant_account_2"
36
+ :login: "your-login"
37
+ :password: "your-password"' \
38
+ http://127.0.0.1:8080/1.0/kb/tenants/uploadPluginConfig/killbill-cybersource
39
+ ```
40
+
41
+ To go to production, create a `cybersource.yml` configuration file under `/var/tmp/bundles/plugins/ruby/killbill-cybersource/x.y.z/` containing the following:
42
+
43
+ ```
44
+ :cybersource:
45
+ :test: false
46
+ ```
47
+
48
+ Usage
49
+ -----
50
+
51
+ To store a credit card (note that CyberSource requires a full billing address, hence the various fields below):
52
+
53
+ ```
54
+ curl -v \
55
+ -X POST \
56
+ -u admin:password \
57
+ -H 'X-Killbill-ApiKey: bob' \
58
+ -H 'X-Killbill-ApiSecret: lazar' \
59
+ -H 'X-Killbill-CreatedBy: admin' \
60
+ -H 'Content-Type: application/json' \
61
+ -d '{
62
+ "pluginName": "killbill-cybersource",
63
+ "pluginInfo": {
64
+ "properties": [
65
+ {
66
+ "key": "ccFirstName",
67
+ "value": "John"
68
+ },
69
+ {
70
+ "key": "ccLastName",
71
+ "value": "Doe"
72
+ },
73
+ {
74
+ "key": "address1",
75
+ "value": "5th Street"
76
+ },
77
+ {
78
+ "key": "city",
79
+ "value": "San Francisco"
80
+ },
81
+ {
82
+ "key": "zip",
83
+ "value": "94111"
84
+ },
85
+ {
86
+ "key": "state",
87
+ "value": "CA"
88
+ },
89
+ {
90
+ "key": "country",
91
+ "value": "USA"
92
+ },
93
+ {
94
+ "key": "ccExpirationMonth",
95
+ "value": 12
96
+ },
97
+ {
98
+ "key": "ccExpirationYear",
99
+ "value": 2017
100
+ },
101
+ {
102
+ "key": "ccNumber",
103
+ "value": "4111111111111111"
104
+ }
105
+ ]
106
+ }
107
+ }' \
108
+ "http://127.0.0.1:8080/1.0/kb/accounts/2a55045a-ce1d-4344-942d-b825536328f9/paymentMethods?isDefault=true&pluginProperty=skip_gw=true"
109
+ ```
110
+
111
+ CyberSource also requires an email address during the payment call. The plugin will pull the one from the Kill Bill account. Alternatively, you can pass it as a plugin property:
112
+
113
+ ```
114
+ curl -v \
115
+ -X POST \
116
+ -u admin:password \
117
+ -H 'X-Killbill-ApiKey: bob' \
118
+ -H 'X-Killbill-ApiSecret: lazar' \
119
+ -H 'X-Killbill-CreatedBy: admin' \
120
+ -H 'Content-Type: application/json' \
121
+ -d '{
122
+ "transactionType": "AUTHORIZE",
123
+ "amount": 5
124
+ }' \
125
+ http://127.0.0.1:8080/1.0/kb/accounts/2a55045a-ce1d-4344-942d-b825536328f9/payments?pluginProperty=email=john@doe.com
126
+ ```