activemerchant 1.107.2 → 1.107.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4b704d184c4e243e3026a3ecca838279de90491495d7fd0f4bf03addc1cd21f
4
- data.tar.gz: 6caaf2044ce6013c47ba00415443945adc466c5df7b684a2ad0b20f66ebec0e8
3
+ metadata.gz: 07ae67a126faf1c4123540018228b4fa2cde8e60cba7f3ff274b939f8a9cd5f3
4
+ data.tar.gz: 8b280d1f7d3ffa183adfe3851afd46362bbd42d8bf8673af9f32ceba92b91084
5
5
  SHA512:
6
- metadata.gz: 0167a96bd917e3268deab4aad83073380fbd5b9c61106814f17cd886604acc1ed98dd99006648742f23fc12db85c4da7d4d4c32f9b8e411e542f9c1c6f8c05a5
7
- data.tar.gz: 72642b914bba4bebe7db3cee4104f77aeba688c7e88efb8f4d2e5dc480f4c3a9211ac653741c9f973fc78ddf7062b84d48ab8b1f144121931588450627b2e545
6
+ metadata.gz: 4735b7fe06d0991807532a7a29d54fb6a189fdb7dc308cc975693877b6ff7cebeafcf61fecd10ca9a733406a5027063bc1396e1f878b6d5d49bd5d2087fc338b
7
+ data.tar.gz: 5c793be60a27bf1bdbae18a6a973261ed93a3e1e883ee9af6c7c52f644fdbe46edff6cbe142d0136fcb163a015aecfa3195471e0c184a633cff056b569caa1e2
data/CHANGELOG CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  == HEAD
4
4
 
5
+ == Version 1.107.3 (May 8, 2020)
6
+ * Realex: Ignore IPv6 unsupported addresses [elfassy] #3622
7
+ * Cybersource: Set partnerSolutionID after the business rules, fixes 500 error [pi3r] #3621
8
+
5
9
  == Version 1.107.2 (May 7, 2020)
6
10
  * Cybersource: Send a specific card brand commerceIndicator for 3DS [pi3r] #3620
7
11
  * Cybersource: Send application_id as partnerSolutionID [pi3r] #3620
@@ -280,6 +280,7 @@ module ActiveMerchant #:nodoc:
280
280
  add_stored_credential_options(xml, options)
281
281
  add_issuer_additional_data(xml, options)
282
282
  add_merchant_description(xml, options)
283
+ add_partner_solution_id(xml)
283
284
 
284
285
  xml.target!
285
286
  end
@@ -307,6 +308,7 @@ module ActiveMerchant #:nodoc:
307
308
  add_business_rules_data(xml, authorization, options)
308
309
  add_issuer_additional_data(xml, options)
309
310
  add_merchant_description(xml, options)
311
+ add_partner_solution_id(xml)
310
312
 
311
313
  xml.target!
312
314
  end
@@ -327,6 +329,7 @@ module ActiveMerchant #:nodoc:
327
329
  end
328
330
  add_issuer_additional_data(xml, options)
329
331
  add_merchant_description(xml, options)
332
+ add_partner_solution_id(xml)
330
333
 
331
334
  xml.target!
332
335
  end
@@ -346,6 +349,8 @@ module ActiveMerchant #:nodoc:
346
349
  add_auth_reversal_service(xml, request_id, request_token)
347
350
  end
348
351
  add_issuer_additional_data(xml, options)
352
+ add_partner_solution_id(xml)
353
+
349
354
  xml.target!
350
355
  end
351
356
 
@@ -356,6 +361,7 @@ module ActiveMerchant #:nodoc:
356
361
  xml = Builder::XmlMarkup.new indent: 2
357
362
  add_purchase_data(xml, money, true, options)
358
363
  add_credit_service(xml, request_id, request_token)
364
+ add_partner_solution_id(xml)
359
365
 
360
366
  xml.target!
361
367
  end
@@ -471,7 +477,6 @@ module ActiveMerchant #:nodoc:
471
477
  xml.tag! 'clientLibrary', 'Ruby Active Merchant'
472
478
  xml.tag! 'clientLibraryVersion', VERSION
473
479
  xml.tag! 'clientEnvironment', RUBY_PLATFORM
474
- xml.tag!('partnerSolutionID', application_id) if application_id
475
480
 
476
481
  add_merchant_descriptor(xml, options)
477
482
  end
@@ -821,6 +826,12 @@ module ActiveMerchant #:nodoc:
821
826
  end
822
827
  end
823
828
 
829
+ def add_partner_solution_id(xml)
830
+ return unless application_id
831
+
832
+ xml.tag!('partnerSolutionID', application_id)
833
+ end
834
+
824
835
  # Where we actually build the full SOAP request using builder
825
836
  def build_request(body, options)
826
837
  xsd_version = test? ? TEST_XSD_VERSION : PRODUCTION_XSD_VERSION
@@ -230,13 +230,14 @@ module ActiveMerchant
230
230
  def add_address_and_customer_info(xml, options)
231
231
  billing_address = options[:billing_address] || options[:address]
232
232
  shipping_address = options[:shipping_address]
233
+ ipv4_address = ipv4?(options[:ip]) ? options[:ip] : nil
233
234
 
234
- return unless billing_address || shipping_address || options[:customer] || options[:invoice] || options[:ip]
235
+ return unless billing_address || shipping_address || options[:customer] || options[:invoice] || ipv4_address
235
236
 
236
237
  xml.tag! 'tssinfo' do
237
238
  xml.tag! 'custnum', options[:customer] if options[:customer]
238
239
  xml.tag! 'prodid', options[:invoice] if options[:invoice]
239
- xml.tag! 'custipaddress', options[:ip] if options[:ip]
240
+ xml.tag! 'custipaddress', options[:ip] if ipv4_address
240
241
 
241
242
  if billing_address
242
243
  xml.tag! 'address', 'type' => 'billing' do
@@ -369,6 +370,11 @@ module ActiveMerchant
369
370
  def sanitize_order_id(order_id)
370
371
  order_id.to_s.gsub(/[^a-zA-Z0-9\-_]/, '')
371
372
  end
373
+
374
+ def ipv4?(ip_address)
375
+ return false if ip_address.nil?
376
+ !!ip_address[/\A\d+\.\d+\.\d+\.\d+\z/]
377
+ end
372
378
  end
373
379
  end
374
380
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveMerchant
2
- VERSION = '1.107.2'
2
+ VERSION = '1.107.3'
3
3
  end
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.107.2
4
+ version: 1.107.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-07 00:00:00.000000000 Z
11
+ date: 2020-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport