killbill-cybersource 5.0.0 → 5.0.1

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: 0a224156ba9595406d4fc3d82c3199da92aebbd2
4
- data.tar.gz: edb836514141a5c97dfb2920466cd90e58fdc805
3
+ metadata.gz: 0e5adf0bd139aaa649c6648ee5f0c713eb9dcaab
4
+ data.tar.gz: a6fc74fef61a79f9d87ee6ff08b2f47f2c37ade7
5
5
  SHA512:
6
- metadata.gz: 3a840d0354defa6c94371ca839bf24a56aa46abaa39a26ed40b485889d2e74a96f8799e24b7df5e2a4c6ef7ab5d4e75d9a5d98dcd62dd3a409a6ea449f3515cd
7
- data.tar.gz: baf3380a9f8ef50aab45bfa4b9e4d6d5527d015d4fbf332c5ab964f592e4f7660945a373dba2c800bd7aaa04896bdf627c2f0a6bc85ed05d1dcdd25619fbbbdb
6
+ metadata.gz: 60715d504beab4ba7e4944f961d2c956d5fa2ed55303c54d3ae01ce0ba1e2e04cc96f0ccd20d9761099463e755e9ae6d103b33899c9b38b62172d78c30e4a80e
7
+ data.tar.gz: 9fbae06da914dd66e685c318c35880163471c5a7512afbf26977303afd6935fd1d886675206ad8beca30dccf03ba3716633e8d5f3526a0fd27ff9bd068fb2eca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- killbill-cybersource (5.0.0)
4
+ killbill-cybersource (5.0.1)
5
5
  actionpack (~> 4.1.0)
6
6
  actionview (~> 4.1.0)
7
7
  activemerchant (~> 1.48.0)
@@ -80,7 +80,7 @@ GEM
80
80
  jdbc-sqlite3 (3.8.11.2)
81
81
  jruby-openssl (0.9.18-java)
82
82
  json (1.8.3-java)
83
- killbill (8.3.0)
83
+ killbill (8.3.1)
84
84
  rack (>= 1.5.2)
85
85
  sinatra (~> 1.3.4)
86
86
  typhoeus (~> 0.6.9)
data/Jarfile.lock CHANGED
@@ -13,6 +13,8 @@
13
13
  - org.kill-bill.commons:killbill-clock:jar:0.20
14
14
  - org.kill-bill.billing:killbill-util:jar:0.18.0
15
15
  - com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.4.5
16
+ - org.bouncycastle:bcprov-jdk15on:jar:1.55
17
+ - org.bouncycastle:bcpkix-jdk15on:jar:1.55
16
18
  - org.kill-bill.billing.plugin:killbill-plugin-api-entitlement:jar:0.23
17
19
  - org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:jar:1.16
18
20
  - com.h2database:h2:jar:1.4.186
@@ -33,11 +35,9 @@
33
35
  - io.dropwizard.metrics:metrics-ehcache:jar:3.1.1
34
36
  - org.jdbi:jdbi:jar:2.62
35
37
  - com.fasterxml.jackson.core:jackson-core:jar:2.4.5
36
- - org.bouncycastle:bcpkix-jdk15on:jar:1.54
37
38
  - org.apache.felix:org.apache.felix.framework:jar:4.4.1
38
39
  - org.joda:joda-money:jar:0.9
39
40
  - org.kill-bill.billing.plugin:killbill-plugin-api-payment:jar:0.23
40
- - org.bouncycastle:bcprov-jdk15on:jar:1.54
41
41
  - org.apache.shiro:shiro-core:jar:1.2.3
42
42
  - org.kill-bill.billing:killbill-internal-api:jar:0.18.0
43
43
  - org.kill-bill.billing:killbill-util:jar:tests:0.18.0
data/NEWS CHANGED
@@ -1,6 +1,12 @@
1
+ 5.0.1
2
+ Re-use original payment processor by default when crediting
3
+
1
4
  5.0.0
2
5
  Initial release for Kill Bill 0.18.x
3
6
 
7
+ 4.0.12
8
+ Re-use original payment processor by default when crediting
9
+
4
10
  4.0.11
5
11
  Bugfix for OnDemand API
6
12
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.0
1
+ 5.0.1
@@ -89,9 +89,10 @@ module Killbill #:nodoc:
89
89
  end
90
90
 
91
91
  def refund_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
92
- if should_credit?(kb_payment_id, context, properties_to_hash(properties))
92
+ credit_opts = properties_to_hash(properties)
93
+ if should_credit?(kb_payment_id, context, credit_opts)
93
94
  # Note: from the plugin perspective, this transaction is a CREDIT but Kill Bill doesn't care about PaymentTransactionInfoPlugin#TransactionType
94
- return credit_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
95
+ return credit_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, hash_to_properties(credit_opts), context)
95
96
  end
96
97
 
97
98
  # Pass extra parameters for the gateway here
@@ -276,6 +277,8 @@ module Killbill #:nodoc:
276
277
 
277
278
  threshold = (Killbill::Plugin::ActiveMerchant::Utils.normalized(options, :auto_credit_threshold) || SIXTY_DAYS_AGO).to_i
278
279
 
280
+ options[:payment_processor_account_id] ||= transaction.payment_processor_account_id
281
+
279
282
  (now - transaction.created_at) >= threshold
280
283
  end
281
284
 
data/pom.xml CHANGED
@@ -25,7 +25,7 @@
25
25
  <groupId>org.kill-bill.billing.plugin.ruby</groupId>
26
26
  <artifactId>cybersource-plugin</artifactId>
27
27
  <packaging>pom</packaging>
28
- <version>5.0.0</version>
28
+ <version>5.0.1</version>
29
29
  <name>cybersource-plugin</name>
30
30
  <url>http://github.com/killbill/killbill-cybersource-plugin</url>
31
31
  <description>Plugin for accessing Cybersource as a payment gateway</description>
@@ -62,7 +62,14 @@ describe Killbill::Cybersource::PaymentPlugin do
62
62
  with_transaction(kb_payment_id, :AUTHORIZE, 61.days.ago, context) do
63
63
  @plugin.should_credit?(kb_payment_id, context, {:disable_auto_credit => true}).should be_false
64
64
  @plugin.should_credit?(kb_payment_id, context, {:auto_credit_threshold => 61 * 86400 + 3600 + 10}).should be_false
65
- @plugin.should_credit?(kb_payment_id, context).should be_true
65
+
66
+ options = {}
67
+ @plugin.should_credit?(kb_payment_id, context, options).should be_true
68
+ options[:payment_processor_account_id].should == 'GOOD'
69
+
70
+ options = {:payment_processor_account_id => 'OVERRIDDEN'}
71
+ @plugin.should_credit?(kb_payment_id, context, options).should be_true
72
+ options[:payment_processor_account_id].should == 'OVERRIDDEN'
66
73
  end
67
74
  end
68
75
 
@@ -300,6 +307,7 @@ describe Killbill::Cybersource::PaymentPlugin do
300
307
  :transaction_type => transaction_type,
301
308
  :kb_tenant_id => context.tenant_id,
302
309
  :created_at => created_at,
310
+ :payment_processor_account_id => 'GOOD',
303
311
  # The data below doesn't matter
304
312
  :updated_at => created_at,
305
313
  :kb_account_id => SecureRandom.uuid,
metadata CHANGED
@@ -1,275 +1,275 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-cybersource
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
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: 2016-11-16 00:00:00.000000000 Z
11
+ date: 2016-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: killbill
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '8.0'
20
14
  requirement: !ruby/object:Gem::Requirement
21
15
  requirements:
22
- - - ~>
16
+ - - "~>"
23
17
  - !ruby/object:Gem::Version
24
18
  version: '8.0'
19
+ name: killbill
25
20
  prerelease: false
26
21
  type: :runtime
27
- - !ruby/object:Gem::Dependency
28
- name: sinatra
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
- - - ~>
24
+ - - "~>"
32
25
  - !ruby/object:Gem::Version
33
- version: 1.3.4
26
+ version: '8.0'
27
+ - !ruby/object:Gem::Dependency
34
28
  requirement: !ruby/object:Gem::Requirement
35
29
  requirements:
36
- - - ~>
30
+ - - "~>"
37
31
  - !ruby/object:Gem::Version
38
32
  version: 1.3.4
33
+ name: sinatra
39
34
  prerelease: false
40
35
  type: :runtime
41
- - !ruby/object:Gem::Dependency
42
- name: thread_safe
43
36
  version_requirements: !ruby/object:Gem::Requirement
44
37
  requirements:
45
- - - ~>
38
+ - - "~>"
46
39
  - !ruby/object:Gem::Version
47
- version: 0.3.4
40
+ version: 1.3.4
41
+ - !ruby/object:Gem::Dependency
48
42
  requirement: !ruby/object:Gem::Requirement
49
43
  requirements:
50
- - - ~>
44
+ - - "~>"
51
45
  - !ruby/object:Gem::Version
52
46
  version: 0.3.4
47
+ name: thread_safe
53
48
  prerelease: false
54
49
  type: :runtime
55
- - !ruby/object:Gem::Dependency
56
- name: activerecord
57
50
  version_requirements: !ruby/object:Gem::Requirement
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
- version: 4.1.0
54
+ version: 0.3.4
55
+ - !ruby/object:Gem::Dependency
62
56
  requirement: !ruby/object:Gem::Requirement
63
57
  requirements:
64
- - - ~>
58
+ - - "~>"
65
59
  - !ruby/object:Gem::Version
66
60
  version: 4.1.0
61
+ name: activerecord
67
62
  prerelease: false
68
63
  type: :runtime
69
- - !ruby/object:Gem::Dependency
70
- name: activerecord-bogacs
71
64
  version_requirements: !ruby/object:Gem::Requirement
72
65
  requirements:
73
- - - ~>
66
+ - - "~>"
74
67
  - !ruby/object:Gem::Version
75
- version: '0.3'
68
+ version: 4.1.0
69
+ - !ruby/object:Gem::Dependency
76
70
  requirement: !ruby/object:Gem::Requirement
77
71
  requirements:
78
- - - ~>
72
+ - - "~>"
79
73
  - !ruby/object:Gem::Version
80
74
  version: '0.3'
75
+ name: activerecord-bogacs
81
76
  prerelease: false
82
77
  type: :runtime
83
- - !ruby/object:Gem::Dependency
84
- name: activerecord-jdbc-adapter
85
78
  version_requirements: !ruby/object:Gem::Requirement
86
79
  requirements:
87
- - - ~>
80
+ - - "~>"
88
81
  - !ruby/object:Gem::Version
89
- version: '1.3'
82
+ version: '0.3'
83
+ - !ruby/object:Gem::Dependency
90
84
  requirement: !ruby/object:Gem::Requirement
91
85
  requirements:
92
- - - ~>
86
+ - - "~>"
93
87
  - !ruby/object:Gem::Version
94
88
  version: '1.3'
89
+ name: activerecord-jdbc-adapter
95
90
  prerelease: false
96
91
  type: :runtime
97
- - !ruby/object:Gem::Dependency
98
- name: jruby-openssl
99
92
  version_requirements: !ruby/object:Gem::Requirement
100
93
  requirements:
101
- - - ~>
94
+ - - "~>"
102
95
  - !ruby/object:Gem::Version
103
- version: 0.9.6
96
+ version: '1.3'
97
+ - !ruby/object:Gem::Dependency
104
98
  requirement: !ruby/object:Gem::Requirement
105
99
  requirements:
106
- - - ~>
100
+ - - "~>"
107
101
  - !ruby/object:Gem::Version
108
102
  version: 0.9.6
103
+ name: jruby-openssl
109
104
  prerelease: false
110
105
  type: :runtime
111
- - !ruby/object:Gem::Dependency
112
- name: actionpack
113
106
  version_requirements: !ruby/object:Gem::Requirement
114
107
  requirements:
115
- - - ~>
108
+ - - "~>"
116
109
  - !ruby/object:Gem::Version
117
- version: 4.1.0
110
+ version: 0.9.6
111
+ - !ruby/object:Gem::Dependency
118
112
  requirement: !ruby/object:Gem::Requirement
119
113
  requirements:
120
- - - ~>
114
+ - - "~>"
121
115
  - !ruby/object:Gem::Version
122
116
  version: 4.1.0
117
+ name: actionpack
123
118
  prerelease: false
124
119
  type: :runtime
125
- - !ruby/object:Gem::Dependency
126
- name: actionview
127
120
  version_requirements: !ruby/object:Gem::Requirement
128
121
  requirements:
129
- - - ~>
122
+ - - "~>"
130
123
  - !ruby/object:Gem::Version
131
124
  version: 4.1.0
125
+ - !ruby/object:Gem::Dependency
132
126
  requirement: !ruby/object:Gem::Requirement
133
127
  requirements:
134
- - - ~>
128
+ - - "~>"
135
129
  - !ruby/object:Gem::Version
136
130
  version: 4.1.0
131
+ name: actionview
137
132
  prerelease: false
138
133
  type: :runtime
139
- - !ruby/object:Gem::Dependency
140
- name: activemerchant
141
134
  version_requirements: !ruby/object:Gem::Requirement
142
135
  requirements:
143
- - - ~>
136
+ - - "~>"
144
137
  - !ruby/object:Gem::Version
145
- version: 1.48.0
138
+ version: 4.1.0
139
+ - !ruby/object:Gem::Dependency
146
140
  requirement: !ruby/object:Gem::Requirement
147
141
  requirements:
148
- - - ~>
142
+ - - "~>"
149
143
  - !ruby/object:Gem::Version
150
144
  version: 1.48.0
145
+ name: activemerchant
151
146
  prerelease: false
152
147
  type: :runtime
153
- - !ruby/object:Gem::Dependency
154
- name: offsite_payments
155
148
  version_requirements: !ruby/object:Gem::Requirement
156
149
  requirements:
157
- - - ~>
150
+ - - "~>"
158
151
  - !ruby/object:Gem::Version
159
- version: 2.1.0
152
+ version: 1.48.0
153
+ - !ruby/object:Gem::Dependency
160
154
  requirement: !ruby/object:Gem::Requirement
161
155
  requirements:
162
- - - ~>
156
+ - - "~>"
163
157
  - !ruby/object:Gem::Version
164
158
  version: 2.1.0
159
+ name: offsite_payments
165
160
  prerelease: false
166
161
  type: :runtime
167
- - !ruby/object:Gem::Dependency
168
- name: monetize
169
162
  version_requirements: !ruby/object:Gem::Requirement
170
163
  requirements:
171
- - - ~>
164
+ - - "~>"
172
165
  - !ruby/object:Gem::Version
173
- version: 1.1.0
166
+ version: 2.1.0
167
+ - !ruby/object:Gem::Dependency
174
168
  requirement: !ruby/object:Gem::Requirement
175
169
  requirements:
176
- - - ~>
170
+ - - "~>"
177
171
  - !ruby/object:Gem::Version
178
172
  version: 1.1.0
173
+ name: monetize
179
174
  prerelease: false
180
175
  type: :runtime
181
- - !ruby/object:Gem::Dependency
182
- name: money
183
176
  version_requirements: !ruby/object:Gem::Requirement
184
177
  requirements:
185
- - - ~>
178
+ - - "~>"
186
179
  - !ruby/object:Gem::Version
187
- version: 6.5.1
180
+ version: 1.1.0
181
+ - !ruby/object:Gem::Dependency
188
182
  requirement: !ruby/object:Gem::Requirement
189
183
  requirements:
190
- - - ~>
184
+ - - "~>"
191
185
  - !ruby/object:Gem::Version
192
186
  version: 6.5.1
187
+ name: money
193
188
  prerelease: false
194
189
  type: :runtime
195
- - !ruby/object:Gem::Dependency
196
- name: jbundler
197
190
  version_requirements: !ruby/object:Gem::Requirement
198
191
  requirements:
199
- - - ~>
192
+ - - "~>"
200
193
  - !ruby/object:Gem::Version
201
- version: 0.9.2
194
+ version: 6.5.1
195
+ - !ruby/object:Gem::Dependency
202
196
  requirement: !ruby/object:Gem::Requirement
203
197
  requirements:
204
- - - ~>
198
+ - - "~>"
205
199
  - !ruby/object:Gem::Version
206
200
  version: 0.9.2
201
+ name: jbundler
207
202
  prerelease: false
208
203
  type: :development
209
- - !ruby/object:Gem::Dependency
210
- name: rake
211
204
  version_requirements: !ruby/object:Gem::Requirement
212
205
  requirements:
213
- - - '>='
206
+ - - "~>"
214
207
  - !ruby/object:Gem::Version
215
- version: 10.0.0
208
+ version: 0.9.2
209
+ - !ruby/object:Gem::Dependency
216
210
  requirement: !ruby/object:Gem::Requirement
217
211
  requirements:
218
- - - '>='
212
+ - - ">="
219
213
  - !ruby/object:Gem::Version
220
214
  version: 10.0.0
215
+ name: rake
221
216
  prerelease: false
222
217
  type: :development
223
- - !ruby/object:Gem::Dependency
224
- name: rspec
225
218
  version_requirements: !ruby/object:Gem::Requirement
226
219
  requirements:
227
- - - ~>
220
+ - - ">="
228
221
  - !ruby/object:Gem::Version
229
- version: 2.12.0
222
+ version: 10.0.0
223
+ - !ruby/object:Gem::Dependency
230
224
  requirement: !ruby/object:Gem::Requirement
231
225
  requirements:
232
- - - ~>
226
+ - - "~>"
233
227
  - !ruby/object:Gem::Version
234
228
  version: 2.12.0
229
+ name: rspec
235
230
  prerelease: false
236
231
  type: :development
237
- - !ruby/object:Gem::Dependency
238
- name: jdbc-sqlite3
239
232
  version_requirements: !ruby/object:Gem::Requirement
240
233
  requirements:
241
- - - ~>
234
+ - - "~>"
242
235
  - !ruby/object:Gem::Version
243
- version: '3.7'
236
+ version: 2.12.0
237
+ - !ruby/object:Gem::Dependency
244
238
  requirement: !ruby/object:Gem::Requirement
245
239
  requirements:
246
- - - ~>
240
+ - - "~>"
247
241
  - !ruby/object:Gem::Version
248
242
  version: '3.7'
243
+ name: jdbc-sqlite3
249
244
  prerelease: false
250
245
  type: :development
251
- - !ruby/object:Gem::Dependency
252
- name: jdbc-mariadb
253
246
  version_requirements: !ruby/object:Gem::Requirement
254
247
  requirements:
255
- - - ~>
248
+ - - "~>"
256
249
  - !ruby/object:Gem::Version
257
- version: '1.1'
250
+ version: '3.7'
251
+ - !ruby/object:Gem::Dependency
258
252
  requirement: !ruby/object:Gem::Requirement
259
253
  requirements:
260
- - - ~>
254
+ - - "~>"
261
255
  - !ruby/object:Gem::Version
262
256
  version: '1.1'
257
+ name: jdbc-mariadb
263
258
  prerelease: false
264
259
  type: :development
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: '1.1'
265
265
  description: Kill Bill payment plugin for Cybersource.
266
266
  email: killbilling-users@googlegroups.com
267
267
  executables: []
268
268
  extensions: []
269
269
  extra_rdoc_files: []
270
270
  files:
271
- - .gitignore
272
- - .travis.yml
271
+ - ".gitignore"
272
+ - ".travis.yml"
273
273
  - Gemfile
274
274
  - Gemfile.head
275
275
  - Gemfile.lock
@@ -309,23 +309,23 @@ licenses:
309
309
  metadata: {}
310
310
  post_install_message:
311
311
  rdoc_options:
312
- - --exclude
313
- - .
312
+ - "--exclude"
313
+ - "."
314
314
  require_paths:
315
315
  - lib
316
316
  required_ruby_version: !ruby/object:Gem::Requirement
317
317
  requirements:
318
- - - '>='
318
+ - - ">="
319
319
  - !ruby/object:Gem::Version
320
320
  version: 1.9.3
321
321
  required_rubygems_version: !ruby/object:Gem::Requirement
322
322
  requirements:
323
- - - '>='
323
+ - - ">="
324
324
  - !ruby/object:Gem::Version
325
325
  version: '0'
326
326
  requirements: []
327
327
  rubyforge_project:
328
- rubygems_version: 2.4.6
328
+ rubygems_version: 2.4.8
329
329
  signing_key:
330
330
  specification_version: 4
331
331
  summary: Plugin to use Cybersource as a gateway.