lib/active_merchant/billing/gateways/trexle.rb in activemerchant-1.79.2 vs lib/active_merchant/billing/gateways/trexle.rb in activemerchant-1.80.0
- old
+ new
@@ -118,11 +118,11 @@
address_country: address[:country]
)
end
def add_invoice(post, options)
- post[:description] = options[:description] || "Active Merchant Purchase"
+ post[:description] = options[:description] || 'Active Merchant Purchase'
end
def add_creditcard(post, creditcard)
if creditcard.respond_to?(:number)
post[:card] ||= {}
@@ -143,12 +143,12 @@
end
end
def headers(params = {})
result = {
- "Content-Type" => "application/json",
- "Authorization" => "Basic #{Base64.strict_encode64(options[:api_key] + ':').strip}"
+ 'Content-Type' => 'application/json',
+ 'Authorization' => "Basic #{Base64.strict_encode64(options[:api_key] + ':').strip}"
}
result['X-Partner-Key'] = params[:partner_key] if params[:partner_key]
result['X-Safe-Card'] = params[:safe_card] if params[:safe_card]
result
@@ -188,16 +188,16 @@
test: test?
)
end
def unparsable_response(raw_response)
- message = "Invalid JSON response received from Trexle. Please contact support@trexle.com if you continue to receive this message."
+ message = 'Invalid JSON response received from Trexle. Please contact support@trexle.com if you continue to receive this message.'
message += " (The raw response returned by the API was #{raw_response.inspect})"
return Response.new(false, message)
end
def invalid_response
- message = "Invalid response."
+ message = 'Invalid response.'
return Response.new(false, message)
end
def token(response)
response['token']