Showing 999 of 1,496 total issues
Class PayTraceGateway
has 38 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class PayTraceGateway < Gateway
self.test_url = 'https://api.sandbox.paytrace.com'
self.live_url = 'https://api.paytrace.com'
self.supported_countries = ['US']
Class DLocalGateway
has 38 methods (exceeds 20 allowed). Consider refactoring. Open
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]
Class QuickpayV10Gateway
has 38 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class QuickpayV10Gateway < Gateway
include QuickpayCommon
API_VERSION = 10
self.live_url = self.test_url = 'https://api.quickpay.net'
Class CredoraxGateway
has 38 methods (exceeds 20 allowed). Consider refactoring. Open
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/'
Class NmiGateway
has 38 methods (exceeds 20 allowed). Consider refactoring. Open
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.'
File element.rb
has 373 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'nokogiri'
require 'securerandom'
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
Method add_payout_destination_data
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
Open
def add_payout_destination_data(post, options)
return unless options[:payout] == true
post[:destination] ||= {}
post[:destination][:account_holder] ||= {}
- Read upRead up
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
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)
- Read upRead up
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
Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class SkipJackGateway < Gateway
API_VERSION = '?.?'
Class PayflowGateway
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class PayflowGateway < Gateway
include PayflowCommonAPI
RECURRING_ACTIONS = Set.new(%i[add modify cancel inquiry reactivate payment])
Class RealexGateway
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class RealexGateway < Gateway
self.live_url = self.test_url = 'https://epage.payandshop.com/epage-remote.cgi'
CARD_MAPPING = {
'master' => 'MC',
Class VantivExpressGateway
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class VantivExpressGateway < Gateway
self.test_url = 'https://certtransaction.elementexpress.com'
self.live_url = 'https://transaction.elementexpress.com'
self.supported_countries = ['US']
Class HpsGateway
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
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']
Class CommerceHubGateway
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
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']
Class Latitude19Gateway
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Latitude19Gateway < Gateway
self.display_name = 'Latitude19 Gateway'
self.homepage_url = 'http://www.l19tech.com'
self.live_url = 'https://gateway.l19tech.com/payments/'
File moneris.rb
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'rexml/document'
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
# To learn more about the Moneris gateway, please contact
File ipg.rb
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
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'
Class QuickbooksGateway
has 36 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class QuickbooksGateway < Gateway
self.test_url = 'https://sandbox.api.intuit.com'
self.live_url = 'https://api.intuit.com'
self.supported_countries = ['US']
Class EbanxGateway
has 36 methods (exceeds 20 allowed). Consider refactoring. Open
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)
Class PlexoGateway
has 36 methods (exceeds 20 allowed). Consider refactoring. Open
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']