lib/active_merchant/billing/gateways/ogone.rb in activemerchant-1.133.0 vs lib/active_merchant/billing/gateways/ogone.rb in activemerchant-1.137.0

- old
+ new

@@ -261,11 +261,11 @@ add_money(post, money, options) commit('RFD', post) end def add_payment_source(post, payment_source, options) - add_d3d(post, options) if options[:d3d] + add_d3d(post, options) if options[:d3d] || three_d_secure(options) if payment_source.is_a?(String) add_alias(post, payment_source, options[:alias_operation]) add_eci(post, options[:eci] || '9') else if options.has_key?(:store) @@ -458,11 +458,11 @@ Digest::SHA1 else raise "Unknown signature algorithm #{algorithm}" end - filtered_params = signed_parameters.compact + filtered_params = signed_parameters.reject { |_k, v| v.nil? || v == '' } sha_encryptor.hexdigest( filtered_params.sort_by { |k, _v| k.upcase }.map { |k, v| "#{k.upcase}=#{v}#{secret}" }.join('') ).upcase end @@ -491,9 +491,13 @@ response_hash = {} rexml_attributes.each do |key, value| response_hash[key] = value end response_hash + end + + def three_d_secure(options) + options[:three_d_secure] ? options[:three_d_secure][:required] : false end end class OgoneResponse < Response def order_id