activemerchant/active_merchant

View on GitHub

Showing 999 of 1,496 total issues

Method build_void_request has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

      def build_void_request(money, transaction_id, approval, token, options)
Severity: Minor
Found in lib/active_merchant/billing/gateways/jetpay.rb - About 35 mins to fix

    Method headers has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

          def headers(method, action, post, authorization = nil, options = {})
    Severity: Minor
    Found in lib/active_merchant/billing/gateways/global_collect.rb - About 35 mins to fix

      Method auth_digest has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            def auth_digest(method, action, post, authorization = nil, options = {})
      Severity: Minor
      Found in lib/active_merchant/billing/gateways/global_collect.rb - About 35 mins to fix

        Method api_request has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

              def api_request(action, request, verb, payment_method_details, options)
        Severity: Minor
        Found in lib/active_merchant/billing/gateways/blue_snap.rb - About 35 mins to fix

          Method authorization_from has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                def authorization_from(success, url, method, response, options)
          Severity: Minor
          Found in lib/active_merchant/billing/gateways/stripe.rb - About 35 mins to fix

            Method order_request has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  def order_request(action, amount, post, credit_card, options = {})
            Severity: Minor
            Found in lib/active_merchant/billing/gateways/xpay.rb - About 35 mins to fix

              Method auth_or_sale has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                    def auth_or_sale(post, transaction_type, amount, payment_method, options)
              Severity: Minor
              Found in lib/active_merchant/billing/gateways/payu_latam.rb - About 35 mins to fix

                Method add_auth_purchase has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      def add_auth_purchase(post, pair_value, money, credit_card_or_reference, options)
                Severity: Minor
                Found in lib/active_merchant/billing/gateways/card_stream.rb - About 35 mins to fix

                  Method auth_or_sale has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        def auth_or_sale(method, authorization, amount, credit_card, options = {})
                  Severity: Minor
                  Found in lib/active_merchant/billing/gateways/latitude19.rb - About 35 mins to fix

                    Method commit has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                          def commit(method, url, parameters = nil, options = {}, type = false)
                    Severity: Minor
                    Found in lib/active_merchant/billing/gateways/worldpay_online_payments.rb - About 35 mins to fix

                      Method add_address has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                            def add_address(xml, payment_method, address, options, shipTo = false)
                      Severity: Minor
                      Found in lib/active_merchant/billing/gateways/cyber_source.rb - About 35 mins to fix

                        Method add_invoice has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                              def add_invoice(doc, action, money, payment_method, options)
                        Severity: Minor
                        Found in lib/active_merchant/billing/gateways/telr.rb - About 35 mins to fix

                          Method add_payment_source has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                                def add_payment_source(post, payment_source, options)
                                  add_d3d(post, options) if options[:d3d] || three_d_secure(options)
                                  if payment_source.is_a?(String)
                                    add_alias(post, payment_source, options[:alias_operation])
                                    add_eci(post, options[:eci] || '9')
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/ogone.rb - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Method add_order has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                                def add_order(post, money, options)
                                  return unless options[:order] || money
                          
                                  order = {}
                                  order_options = options[:order] || {}
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/simetrik.rb - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Method commit has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                                def commit(action, money, parameters)
                                  parameters[:amount] = amount(money) unless action == 'VOID'
                          
                                  # Only activate the test_request when the :test option is passed in
                                  parameters[:test_request] = @options[:test] ? 'TRUE' : 'FALSE'
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/metrics_global.rb - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Method add_payment_method has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                                def add_payment_method(post, payment_method)
                                  if payment_method.respond_to? :brand
                                    post[:NameOnCard] = payment_method.name if payment_method.name
                                    post[:ExpDate]    = expdate(payment_method)
                                    post[:CardNum]    = payment_method.number
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/bridge_pay.rb - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Method store has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                                def store(creditcard, options = {})
                                  post = {}
                                  add_creditcard(post, creditcard, options)
                                  post[:description] = options[:description]
                                  post[:email] = options[:email]
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/webpay.rb - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Method recurring has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                                def recurring(money, credit_card, options = {})
                                  ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE
                          
                                  options[:name] = credit_card.name if options[:name].blank? && credit_card
                                  request = build_recurring_request(options[:profile_id] ? :modify : :add, money, options) do |xml|
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/payflow.rb - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Method add_network_tokenization has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                                def add_network_tokenization(params, payment_method, options)
                                  nt_card = {}
                                  nt_card[:type] = 'D'
                                  nt_card[:cardholder_name] = name_from_payment_method(payment_method) || name_from_address(options)
                                  nt_card[:card_number] = payment_method.number
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/payeezy.rb - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Method parse_element has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                                def parse_element(reply, node)
                                  if node.has_elements?
                                    node.elements.each { |e| parse_element(reply, e) }
                                  else
                                    if /item/.match?(node.parent.name)
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/quantum.rb - About 35 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Severity
                          Category
                          Status
                          Source
                          Language