activemerchant/active_merchant

View on GitHub

Showing 999 of 1,496 total issues

Class PayTraceGateway has 38 methods (exceeds 20 allowed). Consider refactoring.
Open

    class PayTraceGateway < Gateway
      self.test_url = 'https://api.sandbox.paytrace.com'
      self.live_url = 'https://api.paytrace.com'

      self.supported_countries = ['US']
Severity: Minor
Found in lib/active_merchant/billing/gateways/pay_trace.rb - About 5 hrs to fix

    Class DLocalGateway has 38 methods (exceeds 20 allowed). Consider refactoring.
    Open

        class DLocalGateway < Gateway
          self.test_url = 'https://sandbox.dlocal.com'
          self.live_url = 'https://api.dlocal.com'
    
          self.supported_countries = %w[AR BD BO BR CL CM CN CO CR DO EC EG GH GT IN ID JP KE MY MX MA NG PA PY PE PH SN SV TH TR TZ UG UY VN ZA]
    Severity: Minor
    Found in lib/active_merchant/billing/gateways/d_local.rb - About 5 hrs to fix

      Class QuickpayV10Gateway has 38 methods (exceeds 20 allowed). Consider refactoring.
      Open

          class QuickpayV10Gateway < Gateway
            include QuickpayCommon
            API_VERSION = 10
      
            self.live_url = self.test_url = 'https://api.quickpay.net'
      Severity: Minor
      Found in lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb - About 5 hrs to fix

        Class CredoraxGateway has 38 methods (exceeds 20 allowed). Consider refactoring.
        Open

            class CredoraxGateway < Gateway
              class_attribute :test_url, :live_na_url, :live_eu_url
        
              self.display_name = 'Credorax Gateway'
              self.homepage_url = 'https://www.finaro.com/'
        Severity: Minor
        Found in lib/active_merchant/billing/gateways/credorax.rb - About 5 hrs to fix

          Class NmiGateway has 38 methods (exceeds 20 allowed). Consider refactoring.
          Open

              class NmiGateway < Gateway
                include Empty
          
                DUP_WINDOW_DEPRECATION_MESSAGE = 'The class-level duplicate_window variable is deprecated. Please use the :dup_seconds transaction option instead.'
          
          
          Severity: Minor
          Found in lib/active_merchant/billing/gateways/nmi.rb - About 5 hrs to fix

            File element.rb has 373 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            require 'nokogiri'
            require 'securerandom'
            
            module ActiveMerchant #:nodoc:
              module Billing #:nodoc:
            Severity: Minor
            Found in lib/active_merchant/billing/gateways/element.rb - About 4 hrs to fix

              Method add_payout_destination_data has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
              Open

                    def add_payout_destination_data(post, options)
                      return unless options[:payout] == true
              
                      post[:destination] ||= {}
                      post[:destination][:account_holder] ||= {}
              Severity: Minor
              Found in lib/active_merchant/billing/gateways/checkout_v2.rb - About 4 hrs 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_three_d_secure has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
              Open

                    def add_three_d_secure(options, xml)
                      if options[:three_d_secure]
                        three_d_secure = options[:three_d_secure]
                        xml.tag! 'BuyerAuthResult' do
                          authentication_status(three_d_secure, xml)
              Severity: Minor
              Found in lib/active_merchant/billing/gateways/payflow.rb - About 4 hrs 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

              File skip_jack.rb has 370 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              module ActiveMerchant #:nodoc:
                module Billing #:nodoc:
                  class SkipJackGateway < Gateway
                    API_VERSION = '?.?'
              
              
              Severity: Minor
              Found in lib/active_merchant/billing/gateways/skip_jack.rb - About 4 hrs to fix

                Class PayflowGateway has 37 methods (exceeds 20 allowed). Consider refactoring.
                Open

                    class PayflowGateway < Gateway
                      include PayflowCommonAPI
                
                      RECURRING_ACTIONS = Set.new(%i[add modify cancel inquiry reactivate payment])
                
                
                Severity: Minor
                Found in lib/active_merchant/billing/gateways/payflow.rb - About 4 hrs to fix

                  Class RealexGateway has 37 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                      class RealexGateway < Gateway
                        self.live_url = self.test_url = 'https://epage.payandshop.com/epage-remote.cgi'
                  
                        CARD_MAPPING = {
                          'master'            => 'MC',
                  Severity: Minor
                  Found in lib/active_merchant/billing/gateways/realex.rb - About 4 hrs to fix

                    Class VantivExpressGateway has 37 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                        class VantivExpressGateway < Gateway
                          self.test_url = 'https://certtransaction.elementexpress.com'
                          self.live_url = 'https://transaction.elementexpress.com'
                    
                          self.supported_countries = ['US']
                    Severity: Minor
                    Found in lib/active_merchant/billing/gateways/vantiv_express.rb - About 4 hrs to fix

                      Class HpsGateway has 37 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                          class HpsGateway < Gateway
                            self.live_url = 'https://posgateway.secureexchange.net/Hps.Exchange.PosGateway/PosGatewayService.asmx?wsdl'
                            self.test_url = 'https://posgateway.cert.secureexchange.net/Hps.Exchange.PosGateway/PosGatewayService.asmx?wsdl'
                      
                            self.supported_countries = ['US']
                      Severity: Minor
                      Found in lib/active_merchant/billing/gateways/hps.rb - About 4 hrs to fix

                        Class CommerceHubGateway has 37 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                            class CommerceHubGateway < Gateway
                              self.test_url = 'https://connect-cert.fiservapps.com/ch'
                              self.live_url = 'https://prod.api.fiservapps.com/ch'
                        
                              self.supported_countries = ['US']
                        Severity: Minor
                        Found in lib/active_merchant/billing/gateways/commerce_hub.rb - About 4 hrs to fix

                          Class Latitude19Gateway has 37 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                              class Latitude19Gateway < Gateway
                                self.display_name = 'Latitude19 Gateway'
                                self.homepage_url = 'http://www.l19tech.com'
                          
                                self.live_url = 'https://gateway.l19tech.com/payments/'
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/latitude19.rb - About 4 hrs to fix

                            File moneris.rb has 363 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            require 'rexml/document'
                            
                            module ActiveMerchant #:nodoc:
                              module Billing #:nodoc:
                                # To learn more about the Moneris gateway, please contact
                            Severity: Minor
                            Found in lib/active_merchant/billing/gateways/moneris.rb - About 4 hrs to fix

                              File ipg.rb has 362 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              module ActiveMerchant #:nodoc:
                                module Billing #:nodoc:
                                  class IpgGateway < Gateway
                                    self.test_url = 'https://test.ipg-online.com/ipgapi/services'
                                    self.live_url = 'https://www5.ipg-online.com/ipgapi/services'
                              Severity: Minor
                              Found in lib/active_merchant/billing/gateways/ipg.rb - About 4 hrs to fix

                                Class QuickbooksGateway has 36 methods (exceeds 20 allowed). Consider refactoring.
                                Open

                                    class QuickbooksGateway < Gateway
                                      self.test_url = 'https://sandbox.api.intuit.com'
                                      self.live_url = 'https://api.intuit.com'
                                
                                      self.supported_countries = ['US']
                                Severity: Minor
                                Found in lib/active_merchant/billing/gateways/quickbooks.rb - About 4 hrs to fix

                                  Class EbanxGateway has 36 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                      class EbanxGateway < Gateway
                                        self.test_url = 'https://sandbox.ebanxpay.com/ws/'
                                        self.live_url = 'https://api.ebanxpay.com/ws/'
                                  
                                        self.supported_countries = %w(BR MX CO CL AR PE BO EC)
                                  Severity: Minor
                                  Found in lib/active_merchant/billing/gateways/ebanx.rb - About 4 hrs to fix

                                    Class PlexoGateway has 36 methods (exceeds 20 allowed). Consider refactoring.
                                    Open

                                        class PlexoGateway < Gateway
                                          self.test_url = 'https://api.testing.plexo.com.uy/v1/payments'
                                          self.live_url = 'https://api.plexo.com.uy/v1/payments'
                                    
                                          self.supported_countries = ['UY']
                                    Severity: Minor
                                    Found in lib/active_merchant/billing/gateways/plexo.rb - About 4 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language