lib/active_merchant/billing/gateways/pay_junction.rb in activemerchant-1.105.0 vs lib/active_merchant/billing/gateways/pay_junction.rb in activemerchant-1.106.0

- old
+ new

@@ -163,11 +163,11 @@ # The first half of the preauth(authorize)/postauth(capture) model. # Checks to make sure funds are available for a transaction, and returns a # transaction_id that can be used later to postauthorize (capture) the funds. def authorize(money, payment_source, options = {}) parameters = { - :transaction_amount => amount(money), + transaction_amount: amount(money), } add_payment_source(parameters, payment_source) add_address(parameters, options) add_optional_fields(parameters, options) @@ -176,11 +176,11 @@ # A simple sale, capturing funds immediately. # Execute authorization and capture in a single step. def purchase(money, payment_source, options = {}) parameters = { - :transaction_amount => amount(money), + transaction_amount: amount(money), } add_payment_source(parameters, payment_source) add_address(parameters, options) add_optional_fields(parameters, options) @@ -189,24 +189,24 @@ # The second half of the preauth(authorize)/postauth(capture) model. # Retrieve funds that have been previously authorized with _authorization_ def capture(money, authorization, options = {}) parameters = { - :transaction_id => authorization, - :posture => 'capture' + transaction_id: authorization, + posture: 'capture' } add_optional_fields(parameters, options) commit('update', parameters) end # Return money to a card that was previously billed. # _authorization_ should be the transaction id of the transaction we are returning. def refund(money, authorization, options = {}) parameters = { - :transaction_amount => amount(money), - :transaction_id => authorization + transaction_amount: amount(money), + transaction_id: authorization } commit('CREDIT', parameters) end @@ -217,12 +217,12 @@ # Cancel a transaction that has been charged but has not yet made it # through the batch process. def void(authorization, options = {}) parameters = { - :transaction_id => authorization, - :posture => 'void' + transaction_id: authorization, + posture: 'void' } add_optional_fields(parameters, options) commit('update', parameters) end @@ -261,16 +261,16 @@ else start_date = options[:starting_at].strftime('%Y-%m-%d') end parameters = { - :transaction_amount => amount(money), - :schedule_periodic_type => periodic_type, - :schedule_create => 'true', - :schedule_limit => options[:payments].to_i > 1 ? options[:payments] : 1, - :schedule_periodic_number => 1, - :schedule_start => start_date + transaction_amount: amount(money), + schedule_periodic_type: periodic_type, + schedule_create: 'true', + schedule_limit: options[:payments].to_i > 1 ? options[:payments] : 1, + schedule_periodic_number: 1, + schedule_start: start_date } add_payment_source(parameters, payment_source) add_optional_fields(parameters, options) add_address(parameters, options) @@ -336,11 +336,11 @@ url = test? ? self.test_url : self.live_url response = parse(ssl_post(url, post_data(action, parameters))) Response.new(successful?(response), message_from(response), response, - :test => test?, - :authorization => response[:transaction_id] || parameters[:transaction_id] + test: test?, + authorization: response[:transaction_id] || parameters[:transaction_id] ) end def successful?(response) SUCCESS_CODES.include?(response[:response_code]) || response[:query_status] == true