lib/active_merchant/billing/gateways/ebanx.rb in activemerchant-1.114.0 vs lib/active_merchant/billing/gateways/ebanx.rb in activemerchant-1.116.0

- old
+ new

@@ -44,16 +44,16 @@ 'pe' => 300, 'mx' => 300, 'cl' => 5000 } - def initialize(options={}) + def initialize(options = {}) requires!(options, :integration_key) super end - def purchase(money, payment, options={}) + def purchase(money, payment, options = {}) post = { payment: {} } add_integration_key(post) add_operation(post) add_invoice(post, money, options) add_customer_data(post, payment, options) @@ -63,11 +63,11 @@ add_additional_data(post, options) commit(:purchase, post) end - def authorize(money, payment, options={}) + def authorize(money, payment, options = {}) post = { payment: {} } add_integration_key(post) add_operation(post) add_invoice(post, money, options) add_customer_data(post, payment, options) @@ -78,48 +78,48 @@ post[:payment][:creditcard][:auto_capture] = false commit(:authorize, post) end - def capture(money, authorization, options={}) + def capture(money, authorization, options = {}) post = {} add_integration_key(post) post[:hash] = authorization post[:amount] = amount(money) if options[:include_capture_amount].to_s == 'true' commit(:capture, post) end - def refund(money, authorization, options={}) + def refund(money, authorization, options = {}) post = {} add_integration_key(post) add_operation(post) add_authorization(post, authorization) post[:amount] = amount(money) post[:description] = options[:description] commit(:refund, post) end - def void(authorization, options={}) + def void(authorization, options = {}) post = {} add_integration_key(post) add_authorization(post, authorization) commit(:void, post) end - def store(credit_card, options={}) + def store(credit_card, options = {}) post = {} add_integration_key(post) add_payment_details(post, credit_card) post[:country] = customer_country(options) commit(:store, post) end - def verify(credit_card, options={}) + def verify(credit_card, options = {}) MultiResponse.run(:use_first_response) do |r| r.process { authorize(VERIFY_AMOUNT_PER_COUNTRY[customer_country(options)], credit_card, options) } r.process(:ignore_result) { void(r.authorization, options) } end end @@ -220,10 +220,10 @@ JSON.parse(body) end def commit(action, parameters) url = url_for((test? ? test_url : live_url), action, parameters) - response = parse(ssl_request(HTTP_METHOD[action], url, post_data(action, parameters), {'x-ebanx-client-user-agent': "ActiveMerchant/#{ActiveMerchant::VERSION}"})) + response = parse(ssl_request(HTTP_METHOD[action], url, post_data(action, parameters), { 'x-ebanx-client-user-agent': "ActiveMerchant/#{ActiveMerchant::VERSION}" })) success = success_from(action, response) Response.new( success,