activemerchant 1.110.0 → 1.111.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 947d711ce2e079aee4a485b32b4ba5349973461854026135c36192ed4b510ce2
4
- data.tar.gz: bf6ac95e994f6f7aaa22543bdc6cd0ef36e373b3e7b06b249d931a91a11b9d31
3
+ metadata.gz: 680a672c616e4c329cc7fb7cafdd72c417615f6d523c3079f271147f94af6d55
4
+ data.tar.gz: 2b16a9718878e8c7334ac0d7afbc80b605a525d4c267dc952bb25dbf15eb758f
5
5
  SHA512:
6
- metadata.gz: 9d6745f7228a6b068db47d588b3e1d4770d6399aa45fa2ffe74671259d4945bc82fc6cfd7a943fd7b19fd2c8c9ed4e0fb1df76f1fdbf56fee1f01ca316e2ac07
7
- data.tar.gz: 214fe490b01b7b3389137a30641e4fc49df892bb769bedecdf82ac477481670b89026287aa68a8aaad87b283dbf2a1ccc0b55533ccb03b744845352baff46a0f
6
+ metadata.gz: c59f0a8f9b0aa19abba63ca244be4ddc9537d9802858f8453eaef59a4015e2ab6ba9cfbd9fcdc6e1601854804de838d615f2621cb267d571ffa57adadcf6c063
7
+ data.tar.gz: 3d2feb5a78bc21d2f844ff8c16c233cee05a29f1e260dc5b8c47a829ac4c3ee11c7ec5d8f29208b9408ab0c78334840623b557a87410e1a48bc204a01cd23163
data/CHANGELOG CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  == HEAD
4
4
 
5
+ == Version 1.111.0
6
+ * Fat Zebra: standardized 3DS fields and card on file extra data for Visa scheme rules [montdidier] #3409
7
+ * Realex: Change 3DSecure v1 message_version to a valid format [shuhala] #3702
8
+ * Ingenico/ GlobalCollect: Add field for installments [cdmackeyfree] #3707
9
+ * Cybersource: do not send 3DS fields if 'cavv` is missing and `commerceIndicator` is inferred [bbraschi] #3712
10
+
5
11
  == Version 1.110.0
6
12
  * FirstData e4 v27+: Strip linebreaks from address [curiousepic] #3693
7
13
  * Adyen: Change shopper_email to email and shopper_ip to ip [rikterbeek] #3675
@@ -612,6 +612,9 @@ module ActiveMerchant #:nodoc:
612
612
  def add_normalized_threeds_2_data(xml, payment_method, options)
613
613
  threeds_2_options = options[:three_d_secure]
614
614
  cc_brand = card_brand(payment_method).to_sym
615
+
616
+ return if threeds_2_options[:cavv].blank? && infer_commerce_indicator?(options, cc_brand)
617
+
615
618
  xid = threeds_2_options[:xid]
616
619
 
617
620
  xml.tag!('cavv', threeds_2_options[:cavv]) if threeds_2_options[:cavv] && cc_brand != :master
@@ -632,6 +635,10 @@ module ActiveMerchant #:nodoc:
632
635
  xml.tag!('paresStatus', threeds_2_options[:authentication_response_status]) if threeds_2_options[:authentication_response_status]
633
636
  end
634
637
 
638
+ def infer_commerce_indicator?(options, cc_brand)
639
+ options[:commerce_indicator].blank? && ECI_BRAND_MAPPING[cc_brand].present?
640
+ end
641
+
635
642
  def add_threeds_2_ucaf_data(xml, payment_method, options)
636
643
  return unless options[:three_d_secure] && card_brand(payment_method).to_sym == :master
637
644
 
@@ -125,11 +125,13 @@ module ActiveMerchant #:nodoc:
125
125
  def add_extra_options(post, options)
126
126
  extra = {}
127
127
  extra[:ecm] = '32' if options[:recurring]
128
- extra[:cavv] = options[:cavv] if options[:cavv]
129
- extra[:xid] = options[:xid] if options[:xid]
130
- extra[:sli] = options[:sli] if options[:sli]
128
+ extra[:cavv] = options[:cavv] || options.dig(:three_d_secure, :cavv) if options[:cavv] || options.dig(:three_d_secure, :cavv)
129
+ extra[:xid] = options[:xid] || options.dig(:three_d_secure, :xid) if options[:xid] || options.dig(:three_d_secure, :xid)
130
+ extra[:sli] = options[:sli] || options.dig(:three_d_secure, :eci) if options[:sli] || options.dig(:three_d_secure, :eci)
131
131
  extra[:name] = options[:merchant] if options[:merchant]
132
132
  extra[:location] = options[:merchant_location] if options[:merchant_location]
133
+ extra[:card_on_file] = options.dig(:extra, :card_on_file) if options.dig(:extra, :card_on_file)
134
+ extra[:auth_reason] = options.dig(:extra, :auth_reason) if options.dig(:extra, :auth_reason)
133
135
  post[:extra] = extra if extra.any?
134
136
  end
135
137
 
@@ -100,6 +100,7 @@ module ActiveMerchant #:nodoc:
100
100
  'invoiceNumber' => options[:invoice]
101
101
  }
102
102
  add_airline_data(post, options) if options[:airline_data]
103
+ add_number_of_installments(post, options) if options[:number_of_installments]
103
104
  end
104
105
 
105
106
  def add_airline_data(post, options)
@@ -231,6 +232,10 @@ module ActiveMerchant #:nodoc:
231
232
  post['fraudFields'] = fraud_fields unless fraud_fields.empty?
232
233
  end
233
234
 
235
+ def add_number_of_installments(post, options)
236
+ post['order']['additionalInput']['numberOfInstallments'] = options[:number_of_installments] if options[:number_of_installments]
237
+ end
238
+
234
239
  def parse(body)
235
240
  JSON.parse(body)
236
241
  end
@@ -316,6 +316,7 @@ module ActiveMerchant
316
316
  else
317
317
  xml.tag! 'cavv', three_d_secure[:cavv]
318
318
  xml.tag! 'xid', three_d_secure[:xid]
319
+ version = '1'
319
320
  end
320
321
  xml.tag! 'eci', three_d_secure[:eci]
321
322
  xml.tag! 'message_version', version
@@ -1,3 +1,3 @@
1
1
  module ActiveMerchant
2
- VERSION = '1.110.0'
2
+ VERSION = '1.111.0'
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.110.0
4
+ version: 1.111.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: 2020-07-22 00:00:00.000000000 Z
11
+ date: 2020-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -100,6 +100,20 @@ dependencies:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: pry-byebug
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
103
117
  - !ruby/object:Gem::Dependency
104
118
  name: rake
105
119
  requirement: !ruby/object:Gem::Requirement