activemerchant/active_merchant

View on GitHub

Showing 999 of 1,496 total issues

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

    class MoneiGateway < Gateway
      self.live_url = self.test_url = 'https://api.monei.com/v1/payments'

      self.supported_countries = %w[AD AT BE BG CA CH CY CZ DE DK EE ES FI FO FR GB GI GR HU IE IL IS IT LI LT LU LV MT NL NO PL PT RO SE SI SK TR US VA]
      self.default_currency = 'EUR'
Severity: Minor
Found in lib/active_merchant/billing/gateways/monei.rb - About 4 hrs to fix

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

        class CenposGateway < Gateway
          self.display_name = 'CenPOS'
          self.homepage_url = 'https://www.cenpos.com/'
    
          self.live_url = 'https://ww3.cenpos.net/6/transact.asmx'
    Severity: Minor
    Found in lib/active_merchant/billing/gateways/cenpos.rb - About 4 hrs to fix

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

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

        Method add_level_two_data has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
        Open

              def add_level_two_data(doc, payment_method, options = {})
                level_2_data = options[:level_2_data]
                if level_2_data
                  doc.enhancedData do
                    case payment_method.brand
        Severity: Minor
        Found in lib/active_merchant/billing/gateways/litle.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_credit_card has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
        Open

              def add_credit_card(xml, credit_card, address)
                xml.tag! :Card do
                  # DataCash calls the CC number 'pan'
                  xml.tag! :pan, credit_card.number
                  xml.tag! :expirydate, format_date(credit_card.month, credit_card.year)
        Severity: Minor
        Found in lib/active_merchant/billing/gateways/data_cash.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 commerce_hub.rb has 357 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

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

          Class RedsysRestGateway has 35 methods (exceeds 20 allowed). Consider refactoring.
          Open

              class RedsysRestGateway < Gateway
                self.test_url = 'https://sis-t.redsys.es:25443/sis/rest/'
                self.live_url = 'https://sis.redsys.es/sis/rest/'
          
                self.supported_countries = ['ES']
          Severity: Minor
          Found in lib/active_merchant/billing/gateways/redsys_rest.rb - About 4 hrs to fix

            Class JetpayV2Gateway has 35 methods (exceeds 20 allowed). Consider refactoring.
            Open

                class JetpayV2Gateway < Gateway
                  self.test_url = 'https://test1.jetpay.com/jetpay'
                  self.live_url = 'https://gateway20.jetpay.com/jetpay'
            
                  self.money_format = :cents
            Severity: Minor
            Found in lib/active_merchant/billing/gateways/jetpay_v2.rb - About 4 hrs to fix

              Class PaymentezGateway has 35 methods (exceeds 20 allowed). Consider refactoring.
              Open

                  class PaymentezGateway < Gateway #:nodoc:
                    self.test_url = 'https://ccapi-stg.paymentez.com/v2/'
                    self.live_url = 'https://ccapi.paymentez.com/v2/'
              
                    self.supported_countries = %w[MX EC CO BR CL PE]
              Severity: Minor
              Found in lib/active_merchant/billing/gateways/paymentez.rb - About 4 hrs to fix

                Class MundipaggGateway has 35 methods (exceeds 20 allowed). Consider refactoring.
                Open

                    class MundipaggGateway < Gateway
                      self.live_url = 'https://api.mundipagg.com/core/v1'
                
                      self.supported_countries = ['US']
                      self.default_currency = 'USD'
                Severity: Minor
                Found in lib/active_merchant/billing/gateways/mundipagg.rb - About 4 hrs to fix

                  Class FlexChargeGateway has 35 methods (exceeds 20 allowed). Consider refactoring.
                  Open

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

                    Method add_auth_service has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                    Open

                          def add_auth_service(xml, payment_method, options)
                            if network_tokenization?(payment_method)
                              if payment_method.source == :network_token
                                add_auth_network_tokenization(xml, payment_method, options)
                              else
                    Severity: Minor
                    Found in lib/active_merchant/billing/gateways/cyber_source.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 sage.rb has 350 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    module ActiveMerchant #:nodoc:
                      module Billing #:nodoc:
                        class SageGateway < Gateway
                          include Empty
                    
                    
                    Severity: Minor
                    Found in lib/active_merchant/billing/gateways/sage.rb - About 4 hrs to fix

                      File latitude19.rb has 348 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      module ActiveMerchant #:nodoc:
                        module Billing #:nodoc:
                          class Latitude19Gateway < Gateway
                            self.display_name = 'Latitude19 Gateway'
                            self.homepage_url = 'http://www.l19tech.com'
                      Severity: Minor
                      Found in lib/active_merchant/billing/gateways/latitude19.rb - About 4 hrs to fix

                        Class IveriGateway has 34 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                            class IveriGateway < Gateway
                              class_attribute :iveri_url
                        
                              self.live_url = self.test_url = 'https://portal.nedsecure.co.za/iVeriWebService/Service.asmx'
                              self.iveri_url = 'https://portal.host.iveri.com/iVeriWebService/Service.asmx'
                        Severity: Minor
                        Found in lib/active_merchant/billing/gateways/iveri.rb - About 4 hrs to fix

                          Class Shift4Gateway has 34 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                              class Shift4Gateway < Gateway
                                self.test_url = 'https://utgapi.shift4test.com/api/rest/v1/'
                                self.live_url = 'https://utg.shift4api.net/api/rest/v1/'
                          
                                self.supported_countries = %w(US CA CU HT DO PR JM TT GP MQ BS BB LC CW AW VC VI GD AG DM KY KN SX TC MF VG BQ AI BL MS)
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/shift4.rb - About 4 hrs to fix

                            Class BarclaycardSmartpayGateway has 34 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                                class BarclaycardSmartpayGateway < Gateway
                                  self.test_url = 'https://pal-test.barclaycardsmartpay.com/pal/servlet'
                                  self.live_url = 'https://pal-live.barclaycardsmartpay.com/pal/servlet'
                            
                                  self.supported_countries = %w[AL AD AM AT AZ BY BE BA BG HR CY CZ DK EE FI FR DE GR HU IS IE IT KZ LV LI LT LU MK MT MD MC ME NL NO PL PT RO RU SM RS SK SI ES SE CH TR UA GB VA]
                            Severity: Minor
                            Found in lib/active_merchant/billing/gateways/barclaycard_smartpay.rb - About 4 hrs to fix

                              Class IatsPaymentsGateway has 34 methods (exceeds 20 allowed). Consider refactoring.
                              Open

                                  class IatsPaymentsGateway < Gateway
                                    class_attribute :live_na_url, :live_uk_url
                              
                                    self.live_na_url = 'https://www.iatspayments.com/NetGate'
                                    self.live_uk_url = 'https://www.uk.iatspayments.com/NetGate'
                              Severity: Minor
                              Found in lib/active_merchant/billing/gateways/iats_payments.rb - About 4 hrs to fix

                                Class DecidirPlusGateway has 34 methods (exceeds 20 allowed). Consider refactoring.
                                Open

                                    class DecidirPlusGateway < Gateway
                                      self.test_url = 'https://developers.decidir.com/api/v2'
                                      self.live_url = 'https://live.decidir.com/api/v2'
                                
                                      self.supported_countries = ['AR']
                                Severity: Minor
                                Found in lib/active_merchant/billing/gateways/decidir_plus.rb - About 4 hrs to fix

                                  Class DeepstackGateway has 34 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                      class DeepstackGateway < Gateway
                                        self.test_url = 'https://api.sandbox.deepstack.io'
                                        self.live_url = 'https://api.deepstack.io'
                                  
                                        self.supported_countries = ['US']
                                  Severity: Minor
                                  Found in lib/active_merchant/billing/gateways/deepstack.rb - About 4 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language