smartpay 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smartpay/requests/checkout_session.rb +2 -2
- data/lib/smartpay/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b690d134a39f8c15358fddf3366232d36007e243d0f815d9f5c5b8a0d7c5ba97
|
4
|
+
data.tar.gz: 65826519cd1b6eaf41b35b81da6ace598d51e9bfec6188a1e4a8ff5dd0c1c69c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 760b95974a074df025f9d12bdd07477d16395deff65d7322ea35f0473e8aefe0a3055be7c741e6a0417aa9a13fe682b3fec21f41cf6f3968310892402e8ee066
|
7
|
+
data.tar.gz: 803cb1451a936e3def75c46a6e7c4c702c070ea473066c68edc1a1b7163109d36062a6b579267c47b4fb0da075f34ae3a459d172801b28a13125c3c39eb01dd7
|
@@ -166,7 +166,7 @@ module Smartpay
|
|
166
166
|
if currency.nil?
|
167
167
|
items = payload.dig(:orderData, :lineItemData, :priceData) || payload.dig(:items)
|
168
168
|
if !items.nil? && items.count > 0
|
169
|
-
currency = items.first.dig(:currency)
|
169
|
+
currency = items.first.dig(:currency) || item.first.dig('currency')
|
170
170
|
end
|
171
171
|
end
|
172
172
|
currency
|
@@ -177,7 +177,7 @@ module Smartpay
|
|
177
177
|
if total_amount.nil?
|
178
178
|
items = payload.dig(:orderData, :lineItemData, :priceData) || payload.dig(:items)
|
179
179
|
if !items.nil? && items.count > 0
|
180
|
-
total_amount = items.inject(0) { |sum, item| sum + (item[:amount] || 0) }
|
180
|
+
total_amount = items.inject(0) { |sum, item| sum + (item[:amount] || item['amount'] || 0) }
|
181
181
|
end
|
182
182
|
end
|
183
183
|
total_amount
|
data/lib/smartpay/version.rb
CHANGED