Showing 999 of 1,496 total issues
Class QuickpayV4to7Gateway
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class QuickpayV4to7Gateway < Gateway
include QuickpayCommon
self.live_url = self.test_url = 'https://secure.quickpay.dk/api'
APPROVED = '000'
Class QuantumGateway
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class QuantumGateway < Gateway
self.live_url = self.test_url = 'https://secure.quantumgateway.com/cgi/xml_requester.php'
# visa, master, american_express, discover
self.supported_cardtypes = %i[visa master american_express discover]
Class WirecardGateway
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class WirecardGateway < Gateway
self.test_url = 'https://c3-test.wirecard.com/secure/ssl-gateway'
self.live_url = 'https://c3.wirecard.com/secure/ssl-gateway'
# The Namespaces are not really needed, because it just tells the System, that there's actually no namespace used.
Class CulqiGateway
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class CulqiGateway < Gateway
self.display_name = 'Culqi'
self.homepage_url = 'https://www.culqi.com'
self.test_url = 'https://staging.paymentz.com/transaction/'
Class SafeChargeGateway
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class SafeChargeGateway < Gateway
self.test_url = 'https://process.sandbox.safecharge.com/service.asmx/Process'
self.live_url = 'https://process.safecharge.com/service.asmx/Process'
self.supported_countries = %w[AT BE BG CY CZ DE DK EE GR ES FI FR GI HK HR HU IE IS IT LI LT LU LV MT MX NL NO PL PT RO SE SG SI SK GB US]
Class EpayGateway
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class EpayGateway < Gateway
self.live_url = 'https://ssl.ditonlinebetalingssystem.dk/'
self.default_currency = 'DKK'
self.money_format = :cents
Method parameters
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parameters(money, creditcard, options = {})
params = {
payment: {
subtotal: amount(options[:subtotal]),
tax: amount(options[:tax]),
File flex_charge.rb
has 303 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class FlexChargeGateway < Gateway
self.test_url = 'https://api-sandbox.flex-charge.com/v1/'
self.live_url = 'https://api.flex-charge.com/v1/'
Method add_level_three_information_tags_master
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def add_level_three_information_tags_master(doc, payment_method, level_3_data)
doc.customerReference :customerReference, level_3_data[:customer_code] if level_3_data[:customer_code]
doc.salesTax(level_3_data[:total_tax_amount]) if level_3_data[:total_tax_amount]
doc.detailTax do
doc.taxIncludedInTotal(level_3_data[:tax_included_in_total]) if level_3_data[:tax_included_in_total]
- 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_method
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def add_payment_method(doc, payment_method, options)
if payment_method.is_a?(String)
doc.token do
doc.litleToken(payment_method)
doc.expDate(format_exp_date(options[:basis_expiration_month], options[:basis_expiration_year])) if options[:basis_expiration_month] && options[:basis_expiration_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
Method add_stored_credentials
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def add_stored_credentials(xml, card, options)
return unless options[:stored_credential]
xml.tag! 'StoredCredentials' do
xml.tag! 'Indicator', stored_credential_indicator(xml, card, options)
- 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
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def add_payment(post, payment, options = {})
if payment.respond_to?(:routing_number)
post[:checkformat] = options[:check_format] if options[:check_format]
if payment.account_type
account_type = payment.account_type.to_s.capitalize
- 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_level_3_fields
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def add_level_3_fields(xml, options)
level_3_data = options[:level_3_data]
xml.ssl_customer_code level_3_data[:customer_code] if level_3_data[:customer_code]
xml.ssl_salestax level_3_data[:salestax] if level_3_data[:salestax]
xml.ssl_salestax_indicator level_3_data[:salestax_indicator] if level_3_data[:salestax_indicator]
- 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 store
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def store(payment, options = {})
params = {}
post = {}
if payment.is_a?(ApplePayPaymentToken)
- 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 card_connect.rb
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class CardConnectGateway < Gateway
self.test_url = 'https://fts-uat.cardconnect.com/cardconnect/rest/'
self.live_url = 'https://fts.cardconnect.com/cardconnect/rest/'
Class MerchantWareGateway
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class MerchantWareGateway < Gateway
class_attribute :v4_live_url
self.live_url = self.test_url = 'https://ps1.merchantware.net/MerchantWARE/ws/RetailTransaction/TXRetail.asmx'
self.v4_live_url = 'https://ps1.merchantware.net/Merchantware/ws/RetailTransaction/v4/Credit.asmx'
Class NetworkMerchantsGateway
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class NetworkMerchantsGateway < Gateway
self.live_url = self.test_url = 'https://secure.networkmerchants.com/api/transact.php'
self.supported_countries = ['US']
self.supported_cardtypes = %i[visa master american_express discover]
Class BpointGateway
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class BpointGateway < Gateway
self.live_url = 'https://www.bpoint.com.au/evolve/service_1_4_4.asmx'
self.supported_countries = ['AU']
self.default_currency = 'AUD'
Class CtPaymentGateway
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class CtPaymentGateway < Gateway
self.test_url = 'https://test.ctpaiement.ca/v1/'
self.live_url = 'https://www.ctpaiement.com/v1/'
self.supported_countries = %w[US CA]
Class PaymillGateway
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class PaymillGateway < Gateway
self.supported_countries = %w(AD AT BE BG CH CY CZ DE DK EE ES FI FO FR GB
GI GR HR HU IE IL IM IS IT LI LT LU LV MC MT
NL NO PL PT RO SE SI SK TR VA)