lib/eps-rapid/client.rb in eps-rapid-1.1.3 vs lib/eps-rapid/client.rb in eps-rapid-1.2.0

- old
+ new

@@ -44,15 +44,19 @@ private def generate_uri(path, params) uri = URI("#{EpsRapid.base_path}/#{path}") - params.merge!({ language: EpsRapid.language }) + params.merge!({ language: language }) transformed_params = transform_params(params) transformed_params.reject { |k,_| k == :customer_ip } uri.query = URI.encode_www_form(transformed_params) unless path.include?('token') uri + end + + def language + EpsRapid.language_resolver.call end def transform_params(params) params.each do |k, v| params[k] =