lib/active_merchant/billing/gateways/balanced.rb in activemerchant-1.83.0 vs lib/active_merchant/billing/gateways/balanced.rb in activemerchant-1.84.0
- old
+ new
@@ -115,12 +115,12 @@
def reference_identifier_from(identifier)
case identifier
when %r{\|}
uri = identifier.
- split('|').
- detect{|part| part.size > 0}
+ split('|').
+ detect{|part| part.size > 0}
uri.split('/')[2]
when %r{\/}
identifier.split('/')[5]
else
identifier
@@ -170,11 +170,11 @@
Response.new(
success_from(entity_name, raw_response),
message_from(raw_response),
raw_response,
authorization: authorization_from(entity_name, raw_response),
- test: test?,
+ test: test?
)
end
def success_from(entity_name, raw_response)
entity = (raw_response[entity_name] || []).first
@@ -234,15 +234,15 @@
end.compact.join('&')
end
def headers
@@ua ||= JSON.dump(
- bindings_version: ActiveMerchant::VERSION,
- lang: 'ruby',
- lang_version: "#{RUBY_VERSION} p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE})",
- lib_version: BalancedGateway::VERSION,
- platform: RUBY_PLATFORM,
- publisher: 'active_merchant'
+ bindings_version: ActiveMerchant::VERSION,
+ lang: 'ruby',
+ lang_version: "#{RUBY_VERSION} p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE})",
+ lib_version: BalancedGateway::VERSION,
+ platform: RUBY_PLATFORM,
+ publisher: 'active_merchant'
)
{
'Authorization' => 'Basic ' + Base64.encode64(@options[:login].to_s + ':').strip,
'User-Agent' => "Balanced/v1.1 ActiveMerchantBindings/#{ActiveMerchant::VERSION}",