Showing 999 of 1,496 total issues
Method add_payment_sender_data
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def add_payment_sender_data(post, options)
return unless options[:sender].is_a?(Hash)
sender = options[:sender]
- 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_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"
Further reading
Method build_reference_request
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def build_reference_request(action, money, authorization, options)
xml = Builder::XmlMarkup.new
xml.tag! TRANSACTIONS[action] do
xml.tag! 'PNRef', authorization
- 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 firstdata_e4.rb
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class FirstdataE4Gateway < Gateway
# TransArmor support requires v11 or lower
self.test_url = 'https://api.demo.globalgatewaye4.firstdata.com/transaction/v11'
File jetpay.rb
has 342 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class JetpayGateway < Gateway
class_attribute :live_us_url, :live_ca_url
Class SimetrikGateway
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class SimetrikGateway < Gateway
self.test_url = 'https://payments.sta.simetrik.com/v1'
self.live_url = 'https://payments.simetrik.com/v1'
class_attribute :test_auth_url, :live_auth_url, :test_audience, :live_audience
Class OptimalPaymentGateway
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class OptimalPaymentGateway < Gateway
self.test_url = 'https://webservices.test.optimalpayments.com/creditcardWS/CreditCardServlet/v1'
self.live_url = 'https://webservices.optimalpayments.com/creditcardWS/CreditCardServlet/v1'
# The countries the gateway supports merchants from as 2 digit ISO country codes
Class CardConnectGateway
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class CardConnectGateway < Gateway
self.test_url = 'https://fts-uat.cardconnect.com/cardconnect/rest/'
self.live_url = 'https://fts.cardconnect.com/cardconnect/rest/'
self.supported_countries = ['US']
Class BluePayGateway
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class BluePayGateway < Gateway
class_attribute :rebilling_url, :ignore_http_status
self.live_url = 'https://secure.bluepay.com/interfaces/bp20post'
self.rebilling_url = 'https://secure.bluepay.com/interfaces/bp20rebadmin'
Class KushkiGateway
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class KushkiGateway < Gateway
self.display_name = 'Kushki'
self.homepage_url = 'https://www.kushkipagos.com'
self.test_url = 'https://api-uat.kushkipagos.com/'
File rapyd.rb
has 340 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class RapydGateway < Gateway
class_attribute :payment_redirect_test, :payment_redirect_live
File decidir.rb
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class DecidirGateway < Gateway
self.test_url = 'https://developers.decidir.com/api/v2'
self.live_url = 'https://live.decidir.com/api/v2'
File barclaycard_smartpay.rb
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class BarclaycardSmartpayGateway < Gateway
self.test_url = 'https://pal-test.barclaycardsmartpay.com/pal/servlet'
self.live_url = 'https://pal-live.barclaycardsmartpay.com/pal/servlet'
File card_stream.rb
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class CardStreamGateway < Gateway
THREEDSECURE_REQUIRED_DEPRECATION_MESSAGE = 'Specifying the :threeDSRequired initialization option is deprecated. Please use the `:threeds_required => true` *transaction* option instead.'
Class ForteGateway
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
class ForteGateway < Gateway
include Empty
self.test_url = 'https://sandbox.forte.net/api/v2'
self.live_url = 'https://api.forte.net/v2'
Class PayConexGateway
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
class PayConexGateway < Gateway
include Empty
self.test_url = 'https://cert.payconex.net/api/qsapi/3.8/'
self.live_url = 'https://secure.payconex.net/api/qsapi/3.8/'
Class VancoGateway
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
class VancoGateway < Gateway
include Empty
self.test_url = 'https://uat.vancopayments.com/cgi-bin/ws2.vps'
self.live_url = 'https://myvanco.vancopayments.com/cgi-bin/ws2.vps'
Class CecabankJsonGateway
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
class CecabankJsonGateway < Gateway
include CecabankCommon
CECA_ACTIONS_DICTIONARY = {
purchase: :REST_AUTORIZACION,
Class CardknoxGateway
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
class CardknoxGateway < Gateway
self.live_url = 'https://x1.cardknox.com/gateway'
self.supported_countries = %w[US CA GB]
self.default_currency = 'USD'
Class PinGateway
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
class PinGateway < Gateway
self.test_url = 'https://test-api.pinpayments.com/1'
self.live_url = 'https://api.pinpayments.com/1'
self.default_currency = 'AUD'