activemerchant/active_merchant

View on GitHub

Showing 1,005 of 1,501 total issues

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

      def commit(action, options, verb = :post, payment_method_details = PaymentMethodDetails.new(), &block)
Severity: Minor
Found in lib/active_merchant/billing/gateways/blue_snap.rb - About 35 mins to fix

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

          def add_cim_auth_purchase(xml, transaction_type, amount, payment, options)
    Severity: Minor
    Found in lib/active_merchant/billing/gateways/authorize_net.rb - About 35 mins to fix

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

            def add_auth_purchase(xml, transaction_type, amount, payment, options)
      Severity: Minor
      Found in lib/active_merchant/billing/gateways/authorize_net.rb - About 35 mins to fix

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

              def build_field_value_array(soap, tag_name, type, custom_data, fields)
        Severity: Minor
        Found in lib/active_merchant/billing/gateways/usa_epay_advanced.rb - About 35 mins to fix

          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 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 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 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 add_mobile_credit_card has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        def add_mobile_credit_card(post, payment, options, specifics_inputs, expirydate)
                  Severity: Minor
                  Found in lib/active_merchant/billing/gateways/global_collect.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 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 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 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 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 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 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_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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language