Showing 1,478 of 1,478 total issues
Class DibsGateway
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class DibsGateway < Gateway
self.display_name = 'DIBS'
self.homepage_url = 'http://www.dibspayment.com/'
self.live_url = 'https://api.dibspayment.com/merchant/v1/JSON/Transaction/'
Class MerchantWareVersionFourGateway
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class MerchantWareVersionFourGateway < Gateway
self.live_url = 'https://ps1.merchantware.net/Merchantware/ws/RetailTransaction/v4/Credit.asmx'
self.test_url = 'https://ps1.merchantware.net/Merchantware/ws/RetailTransaction/v4/Credit.asmx'
self.supported_countries = ['US']
Class EzicGateway
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class EzicGateway < Gateway
self.live_url = 'https://secure-dm3.ezic.com/gw/sas/direct3.2'
self.supported_countries = %w(AU CA CN FR DE GI IL MT MU MX NL NZ PA PH RU SG KR ES KN GB US)
self.default_currency = 'USD'
Class SecureNetGateway
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class SecureNetGateway < Gateway
API_VERSION = '4.0'
TRANSACTIONS = {
auth_only: '0000',
Class MerchantESolutionsGateway
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class MerchantESolutionsGateway < Gateway
include Empty
self.test_url = 'https://cert.merchante-solutions.com/mes-api/tridentApi'
self.live_url = 'https://api.merchante-solutions.com/mes-api/tridentApi'
Class MaxipagoGateway
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class MaxipagoGateway < Gateway
API_VERSION = '3.1.1.15'
self.live_url = 'https://api.maxipago.net/UniversalAPI/postXML'
self.test_url = 'https://testapi.maxipago.net/UniversalAPI/postXML'
Class QbmsGateway
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class QbmsGateway < Gateway
API_VERSION = '4.0'
class_attribute :test_url, :live_url
Method add_transaction
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def add_transaction(xml, money, options = {}, network_token_eci = nil)
xml.Transaction do
xml.ReversalType REVERSAL_TYPE[options[:reversal_type]] || options[:reversal_type] if options[:reversal_type]
xml.TransactionID options[:trans_id] if options[:trans_id]
xml.TransactionAmount amount(money.to_i) if money
- 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_payment_source
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def add_payment_source(post, payment_method, options)
if payment_method.is_a?(String)
post[:data_key] = payment_method
post[:cust_id] = options[:customer]
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
Method add_3d_secure
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def add_3d_secure(post, options)
if (options[:eci] && options[:xid]) || (options[:three_d_secure] && options[:three_d_secure][:version]&.start_with?('1'))
add_3d_secure_1_data(post, options)
elsif options[:execute_threed] && options[:three_ds_2]
three_ds_2_options = options[:three_ds_2]
- 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_customer_data
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def add_customer_data(xml, payment_source, options)
billing_address = options[:billing_address] || options[:address]
shipping_address = options[:shipping_address] || options[:address]
xml.CustomerData {
- 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 commit
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def commit(method, url, parameters = nil, options = {}, type = false)
raw_response = response = nil
success = false
begin
json = parameters ? parameters.to_json : nil
- 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 build_setup_request
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_setup_request(action, money, options)
currency_code = options[:currency] || currency(money)
options[:payment_action] = action
options[:express_request] = true
options[:shipping_address] ||= options[:address]
File decidir_plus.rb
has 280 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class DecidirPlusGateway < Gateway
self.test_url = 'https://developers.decidir.com/api/v2'
self.live_url = 'https://live.decidir.com/api/v2'
File shift4.rb
has 279 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class Shift4Gateway < Gateway
self.test_url = 'https://utgapi.shift4test.com/api/rest/v1/'
self.live_url = 'https://utg.shift4api.net/api/rest/v1/'
File cardknox.rb
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class CardknoxGateway < Gateway
self.live_url = 'https://x1.cardknox.com/gateway'
Class ExactGateway
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class ExactGateway < Gateway
self.live_url = self.test_url = 'https://secure2.e-xact.com/vplug-in/transaction/rpc-enc/service.asmx'
API_VERSION = '8.5'
Class FatZebraGateway
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class FatZebraGateway < Gateway
self.live_url = 'https://gateway.fatzebra.com.au/v1.0'
self.test_url = 'https://gateway.sandbox.fatzebra.com.au/v1.0'
self.supported_countries = ['AU']
Class SumUpGateway
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class SumUpGateway < Gateway
self.live_url = 'https://api.sumup.com/v0.1/'
self.supported_countries = %w(AT BE BG BR CH CL CO CY CZ DE DK EE ES FI FR
GB GR HR HU IE IT LT LU LV MT NL NO PL PT RO
Class TransFirstGateway
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class TransFirstGateway < Gateway
self.test_url = 'https://ws.cert.transfirst.com'
self.live_url = 'https://webservices.primerchants.com'
self.supported_countries = ['US']