lib/active_merchant/billing/gateways/trexle.rb in activemerchant-1.103.0 vs lib/active_merchant/billing/gateways/trexle.rb in activemerchant-1.104.0

- old
+ new

@@ -104,10 +104,11 @@ post[:ip_address] = options[:ip] if options[:ip] end def add_address(post, creditcard, options) return if creditcard.kind_of?(String) + address = (options[:billing_address] || options[:address]) return unless address post[:card] ||= {} post[:card].merge!( @@ -179,10 +180,11 @@ ) end def error_response(body) return invalid_response unless body['error'] + Response.new( false, body['error'], body, authorization: nil, @@ -205,9 +207,10 @@ response['token'] end def parse(body) return {} if body.blank? + JSON.parse(body) end def post_data(parameters = {}) parameters.to_json