activemerchant 1.72.0 → 1.73.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG +7 -0
- data/lib/active_merchant/billing/gateways/adyen.rb +8 -4
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +2 -2
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +4 -3
- data/lib/active_merchant/billing/gateways/pay_hub.rb +2 -2
- data/lib/active_merchant/billing/gateways/wirecard.rb +4 -4
- data/lib/active_merchant/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82e5954024edb63baed3b663bb1dee80db73f320
|
4
|
+
data.tar.gz: 8c6113aa891504bd482096bcd1f0de9f0d44209a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7bb0c7735d7e7f1d2b12952e13c22a770704a9c468f2d4c0f0c155f284b4d9565833276eb93fbeea4ff15539d41e5987f0dda381198787a13920c0857cd868a
|
7
|
+
data.tar.gz: 6cb69f41e85f93e904ed140e54c0739eda87cbaf0b550506ac9dee21b1bc96b599ef4b417e06f23cffeff7a085a4e373283f70a346e713a62c882b8d21e1a7d3
|
data/CHANGELOG
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
== HEAD
|
4
4
|
|
5
|
+
== Version 1.73.0 (September 28, 2017)
|
6
|
+
* Adyen: Use original authorization pspReference on Refunds [lyverovski] #2589
|
7
|
+
* Braintree Blue: Explicitly require braintree-ruby version 2.78 [anotherjosmith]
|
8
|
+
* FirstData E4: Scrub 3DS cryptogram [jasonwebster] #2596
|
9
|
+
* PayHub: Replace single quotes with double quotes in error message [matthewheath] #2572
|
10
|
+
* Wirecard: Format non-fractional currency amounts correctly [bdewater] #2594
|
11
|
+
|
5
12
|
== Version 1.72.0 (September 20, 2017)
|
6
13
|
* Adyen: Fix failing remote tests [dtykocki] #2584
|
7
14
|
* Authorize.net: Remove numeric restriction on customer ID [dtykocki] #2579
|
@@ -144,7 +144,7 @@ module ActiveMerchant #:nodoc:
|
|
144
144
|
end
|
145
145
|
|
146
146
|
def add_references(post, authorization, options = {})
|
147
|
-
post[:originalReference] = authorization
|
147
|
+
post[:originalReference] = psp_reference_from(authorization)
|
148
148
|
post[:reference] = options[:order_id]
|
149
149
|
end
|
150
150
|
|
@@ -169,7 +169,7 @@ module ActiveMerchant #:nodoc:
|
|
169
169
|
success,
|
170
170
|
message_from(action, response),
|
171
171
|
response,
|
172
|
-
authorization: authorization_from(response),
|
172
|
+
authorization: authorization_from(action, parameters, response),
|
173
173
|
test: test?,
|
174
174
|
error_code: success ? nil : error_code_from(response)
|
175
175
|
)
|
@@ -207,8 +207,8 @@ module ActiveMerchant #:nodoc:
|
|
207
207
|
end
|
208
208
|
end
|
209
209
|
|
210
|
-
def authorization_from(response)
|
211
|
-
response['pspReference']
|
210
|
+
def authorization_from(action, parameters, response)
|
211
|
+
[parameters[:originalReference], response['pspReference']].compact.join("#").presence
|
212
212
|
end
|
213
213
|
|
214
214
|
def init_post(options = {})
|
@@ -223,6 +223,10 @@ module ActiveMerchant #:nodoc:
|
|
223
223
|
STANDARD_ERROR_CODE_MAPPING[response['errorCode']]
|
224
224
|
end
|
225
225
|
|
226
|
+
def psp_reference_from(authorization)
|
227
|
+
authorization.nil? ? nil : authorization.split("#").first
|
228
|
+
end
|
229
|
+
|
226
230
|
end
|
227
231
|
end
|
228
232
|
end
|
@@ -6,8 +6,8 @@ rescue LoadError
|
|
6
6
|
raise "Could not load the braintree gem. Use `gem install braintree` to install it."
|
7
7
|
end
|
8
8
|
|
9
|
-
unless Braintree::Version::Major == 2 && Braintree::Version::Minor >=
|
10
|
-
raise "Need braintree gem >= 2.
|
9
|
+
unless Braintree::Version::Major == 2 && Braintree::Version::Minor >= 78
|
10
|
+
raise "Need braintree gem >= 2.78.0. Run `gem install braintree --version '~>2.78'` to get the correct version."
|
11
11
|
end
|
12
12
|
|
13
13
|
module ActiveMerchant #:nodoc:
|
@@ -141,9 +141,10 @@ module ActiveMerchant #:nodoc:
|
|
141
141
|
end
|
142
142
|
|
143
143
|
def scrub(transcript)
|
144
|
-
transcript
|
145
|
-
gsub(%r((<Card_Number>).+(</Card_Number>)), '\1[FILTERED]\2')
|
146
|
-
gsub(%r((<VerificationStr2>).+(</VerificationStr2>)), '\1[FILTERED]\2')
|
144
|
+
transcript
|
145
|
+
.gsub(%r((<Card_Number>).+(</Card_Number>)), '\1[FILTERED]\2')
|
146
|
+
.gsub(%r((<VerificationStr2>).+(</VerificationStr2>)), '\1[FILTERED]\2')
|
147
|
+
.gsub(%r((<CAVV>).+(</CAVV>)), '\1[FILTERED]\2')
|
147
148
|
end
|
148
149
|
|
149
150
|
def supports_network_tokenization?
|
@@ -200,8 +200,8 @@ module ActiveMerchant #:nodoc:
|
|
200
200
|
|
201
201
|
def json_error(raw_response)
|
202
202
|
{
|
203
|
-
error_message:
|
204
|
-
|
203
|
+
error_message: "Invalid response received from the Payhub API. Please contact wecare@payhub.com if you continue to receive this message." +
|
204
|
+
" (The raw response returned by the API was #{raw_response.inspect})"
|
205
205
|
}
|
206
206
|
end
|
207
207
|
|
@@ -235,7 +235,7 @@ module ActiveMerchant #:nodoc:
|
|
235
235
|
add_address(xml, options[:billing_address])
|
236
236
|
when :capture, :bookback
|
237
237
|
xml.tag! 'GuWID', options[:preauthorization]
|
238
|
-
add_amount(xml, money)
|
238
|
+
add_amount(xml, money, options)
|
239
239
|
when :reversal
|
240
240
|
xml.tag! 'GuWID', options[:preauthorization]
|
241
241
|
end
|
@@ -246,7 +246,7 @@ module ActiveMerchant #:nodoc:
|
|
246
246
|
|
247
247
|
# Includes the payment (amount, currency, country) to the transaction-xml
|
248
248
|
def add_invoice(xml, money, options)
|
249
|
-
add_amount(xml, money)
|
249
|
+
add_amount(xml, money, options)
|
250
250
|
xml.tag! 'Currency', options[:currency] || currency(money)
|
251
251
|
xml.tag! 'CountryCode', options[:billing_address][:country]
|
252
252
|
xml.tag! 'RECURRING_TRANSACTION' do
|
@@ -255,8 +255,8 @@ module ActiveMerchant #:nodoc:
|
|
255
255
|
end
|
256
256
|
|
257
257
|
# Include the amount in the transaction-xml
|
258
|
-
def add_amount(xml, money)
|
259
|
-
xml.tag! 'Amount',
|
258
|
+
def add_amount(xml, money, options)
|
259
|
+
xml.tag! 'Amount', localized_amount(money, options[:currency] || currency(money))
|
260
260
|
end
|
261
261
|
|
262
262
|
# Includes the credit-card data to the transaction-xml
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemerchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.73.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Luetke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|