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

- old
+ new

@@ -29,21 +29,21 @@ 'lost_or_stolen' => STANDARD_ERROR_CODE[:card_declined], 'suspected_fraud' => STANDARD_ERROR_CODE[:card_declined], 'expired_token' => STANDARD_ERROR_CODE[:card_declined] } - def initialize(options={}) + def initialize(options = {}) requires!(options, :secret_key) super end - def purchase(money, payment, options={}) + def purchase(money, payment, options = {}) post = create_post_for_auth_or_purchase(money, payment, options) commit('charges', post, options) end - def authorize(money, payment, options={}) + def authorize(money, payment, options = {}) post = create_post_for_auth_or_purchase(money, payment, options) post[:captured] = 'false' commit('charges', post, options) end @@ -61,11 +61,11 @@ def void(authorization, options = {}) commit("charges/#{CGI.escape(authorization)}/refund", {}, options) end - def verify(credit_card, options={}) + def verify(credit_card, options = {}) MultiResponse.run(:use_first_response) do |r| r.process { authorize(100, credit_card, options) } r.process(:ignore_result) { void(r.authorization, options) } end end @@ -188,11 +188,10 @@ Response.new(success, (success ? 'Transaction approved' : response['error']['message']), response, test: test?, authorization: (success ? response['id'] : response['error']['charge']), - error_code: (success ? nil : STANDARD_ERROR_CODE_MAPPING[response['error']['code']]) - ) + error_code: (success ? nil : STANDARD_ERROR_CODE_MAPPING[response['error']['code']])) end def headers(options = {}) secret_key = options[:secret_key] || @options[:secret_key]