killbill-litle 4.0.1 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/litle/api.rb +16 -5
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b889302fb0e2084e6dad69e9a04f23bd1b2ce901
|
4
|
+
data.tar.gz: e6dd35161fcce5e2a1bf1f2f3eecec32db0c3cd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75589331ceba759b25c7d0eb38421f986f86e173a05aaa513d21775d34e179094c9fddfed44517c0d8ec957c41c7514b9355a6b140f82dbcaef8edc59bd83525
|
7
|
+
data.tar.gz: 2e093c3cb5d0dbbdd8beba673a291a3a5798991fc5b9840805423a02ebd7f214d2fd342edaef2e497ec764eb45fdaa56f9aaa3868bf909a5ff14dc734611b3cf
|
data/lib/litle/api.rb
CHANGED
@@ -28,7 +28,7 @@ module Killbill #:nodoc:
|
|
28
28
|
|
29
29
|
def authorize_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
|
30
30
|
# Pass extra parameters for the gateway here
|
31
|
-
options =
|
31
|
+
options = set_payment_processor_account_id(currency, context.tenant_id)
|
32
32
|
|
33
33
|
paypage_registration_id = find_value_from_properties(properties, 'paypageRegistrationId')
|
34
34
|
options[:paypage_registration_id] = paypage_registration_id unless paypage_registration_id.blank?
|
@@ -39,7 +39,7 @@ module Killbill #:nodoc:
|
|
39
39
|
|
40
40
|
def capture_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
|
41
41
|
# Pass extra parameters for the gateway here
|
42
|
-
options =
|
42
|
+
options = set_payment_processor_account_id(currency, context.tenant_id)
|
43
43
|
|
44
44
|
properties = merge_properties(properties, options)
|
45
45
|
super(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
|
@@ -47,7 +47,7 @@ module Killbill #:nodoc:
|
|
47
47
|
|
48
48
|
def purchase_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
|
49
49
|
# Pass extra parameters for the gateway here
|
50
|
-
options =
|
50
|
+
options = set_payment_processor_account_id(currency, context.tenant_id)
|
51
51
|
|
52
52
|
properties = merge_properties(properties, options)
|
53
53
|
super(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
|
@@ -63,7 +63,7 @@ module Killbill #:nodoc:
|
|
63
63
|
|
64
64
|
def credit_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
|
65
65
|
# Pass extra parameters for the gateway here
|
66
|
-
options =
|
66
|
+
options = set_payment_processor_account_id(currency, context.tenant_id)
|
67
67
|
|
68
68
|
properties = merge_properties(properties, options)
|
69
69
|
super(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
|
@@ -71,7 +71,7 @@ module Killbill #:nodoc:
|
|
71
71
|
|
72
72
|
def refund_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
|
73
73
|
# Pass extra parameters for the gateway here
|
74
|
-
options =
|
74
|
+
options = set_payment_processor_account_id(currency, context.tenant_id)
|
75
75
|
|
76
76
|
properties = merge_properties(properties, options)
|
77
77
|
super(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
|
@@ -185,6 +185,17 @@ module Killbill #:nodoc:
|
|
185
185
|
# gw_notification.entity =
|
186
186
|
end
|
187
187
|
end
|
188
|
+
|
189
|
+
def set_payment_processor_account_id(currency, kb_tenant_id=nil)
|
190
|
+
config = ::Killbill::Plugin::ActiveMerchant.config(kb_tenant_id)
|
191
|
+
options = {}
|
192
|
+
currency_account_id_map = config[:multicurrency]
|
193
|
+
if currency_account_id_map && currency_account_id_map.is_a?(Hash)
|
194
|
+
currency_account_id_map.default = currency_account_id_map.values[0]
|
195
|
+
options = {:payment_processor_account_id => currency_account_id_map[currency.to_sym]}
|
196
|
+
end
|
197
|
+
options
|
198
|
+
end
|
188
199
|
end
|
189
200
|
end
|
190
201
|
end
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: killbill-litle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.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:
|
11
|
+
date: 2018-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: '
|
18
|
+
version: '9.4'
|
19
19
|
name: killbill
|
20
20
|
prerelease: false
|
21
21
|
type: :runtime
|
@@ -23,7 +23,7 @@ dependencies:
|
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '9.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
@@ -218,6 +218,9 @@ dependencies:
|
|
218
218
|
- - ">="
|
219
219
|
- !ruby/object:Gem::Version
|
220
220
|
version: 10.0.0
|
221
|
+
- - "<"
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: 11.0.0
|
221
224
|
name: rake
|
222
225
|
prerelease: false
|
223
226
|
type: :development
|
@@ -226,12 +229,15 @@ dependencies:
|
|
226
229
|
- - ">="
|
227
230
|
- !ruby/object:Gem::Version
|
228
231
|
version: 10.0.0
|
232
|
+
- - "<"
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
version: 11.0.0
|
229
235
|
- !ruby/object:Gem::Dependency
|
230
236
|
requirement: !ruby/object:Gem::Requirement
|
231
237
|
requirements:
|
232
238
|
- - "~>"
|
233
239
|
- !ruby/object:Gem::Version
|
234
|
-
version:
|
240
|
+
version: 3.5.0
|
235
241
|
name: rspec
|
236
242
|
prerelease: false
|
237
243
|
type: :development
|
@@ -239,7 +245,7 @@ dependencies:
|
|
239
245
|
requirements:
|
240
246
|
- - "~>"
|
241
247
|
- !ruby/object:Gem::Version
|
242
|
-
version:
|
248
|
+
version: 3.5.0
|
243
249
|
- !ruby/object:Gem::Dependency
|
244
250
|
requirement: !ruby/object:Gem::Requirement
|
245
251
|
requirements:
|