lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.108.0 vs lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.109.0

- old
+ new

@@ -9,11 +9,11 @@ self.live_url = 'https://api2.authorize.net/xml/v1/request.api' self.supported_countries = %w(AU CA US) self.default_currency = 'USD' self.money_format = :dollars - self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb, :maestro] + self.supported_cardtypes = %i[visa master american_express discover diners_club jcb maestro] self.homepage_url = 'http://www.authorize.net/' self.display_name = 'Authorize.Net' # Authorize.net has slightly different definitions for returned AVS codes @@ -190,11 +190,11 @@ create_customer_profile(credit_card, options) end end def unstore(authorization) - customer_profile_id, _, _ = split_authorization(authorization) + customer_profile_id, = split_authorization(authorization) delete_customer_profile(customer_profile_id) end def verify_credentials @@ -309,11 +309,11 @@ end end end def cim_refund(amount, authorization, options) - transaction_id, card_number, _ = split_authorization(authorization) + transaction_id, card_number, = split_authorization(authorization) commit(:cim_refund, options) do |xml| add_order_id(xml, options) xml.transaction do xml.profileTransRefund do @@ -329,11 +329,11 @@ add_extra_options_for_cim(xml, options) end end def normal_refund(amount, authorization, options) - transaction_id, card_number, _ = split_authorization(authorization) + transaction_id, card_number, = split_authorization(authorization) commit(:refund) do |xml| xml.transactionRequest do xml.transactionType('refundTransaction') xml.amount(amount.nil? ? 0 : amount(amount)) @@ -498,11 +498,11 @@ end end end def add_token_payment_method(xml, token, options) - customer_profile_id, customer_payment_profile_id, _ = split_authorization(token) + customer_profile_id, customer_payment_profile_id, = split_authorization(token) customer_profile_id = options[:customer_profile_id] if options[:customer_profile_id] customer_payment_profile_id = options[:customer_payment_profile_id] if options[:customer_payment_profile_id] xml.customerProfileId(customer_profile_id) xml.customerPaymentProfileId(customer_payment_profile_id) end @@ -753,11 +753,11 @@ [options[:first_name], options[:last_name]] end end def state_from(address, options) - if ['US', 'CA'].include?(address[:country]) + if %w[US CA].include?(address[:country]) address[:state] || 'NC' else address[:state] || 'n/a' end end @@ -986,10 +986,10 @@ def cim?(action) (action == :cim_store) || (action == :cim_store_update) || (action == :cim_store_delete_customer) end def transaction_id_from(authorization) - transaction_id, _, _ = split_authorization(authorization) + transaction_id, = split_authorization(authorization) transaction_id end def fraud_review?(response) (response[:response_code] == FRAUD_REVIEW)