killbill-litle 1.9.3 → 1.9.4
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/NEWS +3 -0
- data/VERSION +1 -1
- data/lib/litle/api.rb +4 -3
- data/lib/litle/models/litle_response.rb +4 -0
- data/pom.xml +1 -1
- metadata +2 -2
data/NEWS
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.9.
|
|
1
|
+
1.9.4
|
data/lib/litle/api.rb
CHANGED
|
@@ -37,7 +37,7 @@ module Killbill::Litle
|
|
|
37
37
|
actual_amount, actual_currency = convert_amount_currency_if_required(amount_in_cents, currency, kb_payment_id)
|
|
38
38
|
|
|
39
39
|
# Go to Litle
|
|
40
|
-
gateway = Killbill::Litle.gateway_for_currency(
|
|
40
|
+
gateway = Killbill::Litle.gateway_for_currency(actual_currency)
|
|
41
41
|
litle_response = gateway.purchase actual_amount, litle_pm.to_litle_card_token, options
|
|
42
42
|
response = save_response_and_transaction litle_response, :charge, kb_payment_id, actual_amount, actual_currency
|
|
43
43
|
|
|
@@ -66,7 +66,7 @@ module Killbill::Litle
|
|
|
66
66
|
actual_amount, actual_currency = convert_amount_currency_if_required(amount_in_cents, currency, kb_payment_id)
|
|
67
67
|
|
|
68
68
|
# Go to Litle
|
|
69
|
-
gateway = Killbill::Litle.gateway_for_currency(
|
|
69
|
+
gateway = Killbill::Litle.gateway_for_currency(actual_currency)
|
|
70
70
|
litle_response = gateway.credit actual_amount, litle_transaction.litle_txn_id, options
|
|
71
71
|
response = save_response_and_transaction litle_response, :refund, kb_payment_id, actual_amount, actual_currency
|
|
72
72
|
response.to_refund_response
|
|
@@ -209,7 +209,8 @@ module Killbill::Litle
|
|
|
209
209
|
|
|
210
210
|
def account_currency(kb_account_id)
|
|
211
211
|
account = @kb_apis.account_user_api.get_account_by_id(kb_account_id, @kb_apis.create_context)
|
|
212
|
-
account.currency
|
|
212
|
+
converted_currency = Killbill::Litle.converted_currency(account.currency)
|
|
213
|
+
converted_currency
|
|
213
214
|
end
|
|
214
215
|
|
|
215
216
|
def report_group_for_currency(currency)
|
|
@@ -89,11 +89,13 @@ module Killbill::Litle
|
|
|
89
89
|
def to_killbill_response(type)
|
|
90
90
|
if litle_transaction.nil?
|
|
91
91
|
amount_in_cents = nil
|
|
92
|
+
currency = nill
|
|
92
93
|
created_date = created_at
|
|
93
94
|
first_payment_reference_id = nil
|
|
94
95
|
second_payment_reference_id = nil
|
|
95
96
|
else
|
|
96
97
|
amount_in_cents = litle_transaction.amount_in_cents
|
|
98
|
+
currency = litle_transaction.currency
|
|
97
99
|
created_date = litle_transaction.created_at
|
|
98
100
|
first_payment_reference_id = params_litleonelineresponse_saleresponse_id
|
|
99
101
|
second_payment_reference_id = litle_transaction.litle_txn_id
|
|
@@ -106,6 +108,7 @@ module Killbill::Litle
|
|
|
106
108
|
if type == :payment
|
|
107
109
|
p_info_plugin = Killbill::Plugin::Model::PaymentInfoPlugin.new
|
|
108
110
|
p_info_plugin.amount = BigDecimal.new(amount_in_cents.to_s) / 100.0 if amount_in_cents
|
|
111
|
+
p_info_plugin.currency = currency
|
|
109
112
|
p_info_plugin.created_date = created_date
|
|
110
113
|
p_info_plugin.effective_date = effective_date
|
|
111
114
|
p_info_plugin.status = (success ? :PROCESSED : :ERROR)
|
|
@@ -117,6 +120,7 @@ module Killbill::Litle
|
|
|
117
120
|
else
|
|
118
121
|
r_info_plugin = Killbill::Plugin::Model::RefundInfoPlugin.new
|
|
119
122
|
r_info_plugin.amount = BigDecimal.new(amount_in_cents.to_s) / 100.0 if amount_in_cents
|
|
123
|
+
r_info_plugin.currency = currency
|
|
120
124
|
r_info_plugin.created_date = created_date
|
|
121
125
|
r_info_plugin.effective_date = effective_date
|
|
122
126
|
r_info_plugin.status = (success ? :PROCESSED : :ERROR)
|
data/pom.xml
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<groupId>com.ning.killbill.ruby</groupId>
|
|
26
26
|
<artifactId>litle-plugin</artifactId>
|
|
27
27
|
<packaging>pom</packaging>
|
|
28
|
-
<version>1.9.
|
|
28
|
+
<version>1.9.4</version>
|
|
29
29
|
<name>litle-plugin</name>
|
|
30
30
|
<url>http://github.com/killbill/killbill-litle-plugin</url>
|
|
31
31
|
<description>Plugin for accessing Litle as a payment gateway</description>
|
metadata
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
name: killbill-litle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 1.9.
|
|
5
|
+
version: 1.9.4
|
|
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-10-
|
|
12
|
+
date: 2013-10-31 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: killbill
|