Showing 1,463 of 1,463 total issues
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']
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
- 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_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)
- 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
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]
Class CommerceHubGateway
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
class CommerceHubGateway < Gateway
self.test_url = 'https://cert.api.fiservapps.com/ch'
self.live_url = 'https://prod.api.fiservapps.com/ch'
self.supported_countries = ['US']
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
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'
Method add_auth_wallet
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def add_auth_wallet(xml, payment_method, options)
commerce_indicator = 'internet' if subsequent_nt_apple_pay_auth(payment_method.source, options)
brand = card_brand(payment_method).to_sym
- 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_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
- 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 redsys_rest.rb
has 350 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
# = Redsys Merchant Gateway
#
# Gateway support for the Spanish "Redsys" payment gateway system. This is
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
File commerce_hub.rb
has 348 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class CommerceHubGateway < Gateway
self.test_url = 'https://cert.api.fiservapps.com/ch'
self.live_url = 'https://prod.api.fiservapps.com/ch'
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'
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'
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)
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]
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'
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']
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']
Method build_mass_pay_request
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def build_mass_pay_request(*args)
default_options = args.last.is_a?(Hash) ? args.pop : {}
recipients = args.first.is_a?(Array) ? args : [args]
receiver_type = default_options[:receiver_type]
- 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"