lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.112.0 vs lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.113.0

- old
+ new

@@ -52,11 +52,11 @@ '3155' => STANDARD_ERROR_CODE[:unsupported_feature], '36' => STANDARD_ERROR_CODE[:incorrect_number], '37' => STANDARD_ERROR_CODE[:invalid_expiry_date], '378' => STANDARD_ERROR_CODE[:invalid_cvc], '38' => STANDARD_ERROR_CODE[:expired_card], - '384' => STANDARD_ERROR_CODE[:config_error], + '384' => STANDARD_ERROR_CODE[:config_error] } MARKET_TYPE = { moto: '1', retail: '2' @@ -769,11 +769,11 @@ def url test? ? test_url : live_url end def parse(action, raw_response, options = {}) - if is_cim_action?(action) || action == :verify_credentials + if cim_action?(action) || action == :verify_credentials parse_cim(raw_response, options) else parse_normal(action, raw_response) end end @@ -800,11 +800,11 @@ error_code: map_error_code(response[:response_code], response[:response_reason_code]) ) end end - def is_cim_action?(action) + def cim_action?(action) action.to_s.start_with?('cim') end def post_data(action) Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml| @@ -822,11 +822,11 @@ 'createCustomerPaymentProfileRequest' elsif action == :cim_store_delete_customer 'deleteCustomerProfileRequest' elsif action == :verify_credentials 'authenticateTestRequest' - elsif is_cim_action?(action) + elsif cim_action?(action) 'createCustomerProfileTransactionRequest' else 'createTransactionRequest' end end @@ -1004,11 +1004,11 @@ STANDARD_ERROR_CODE_MAPPING["#{response_code}#{response_reason_code}"] end def auth_was_for_cim?(authorization) _, _, action = split_authorization(authorization) - action && is_cim_action?(action) + action && cim_action?(action) end def parse_direct_response_elements(response, options) params = response[:direct_response]&.tr('"', '') return {} unless params @@ -1057,10 +1057,10 @@ cardholder_authentication_verification_response: parts[39], account_number: parts[50] || '', card_type: parts[51] || '', split_tender_id: parts[52] || '', requested_amount: parts[53] || '', - balance_on_card: parts[54] || '', + balance_on_card: parts[54] || '' } end end end end