Showing 1,478 of 1,478 total issues
Class PaystationGateway
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class PaystationGateway < Gateway
self.live_url = self.test_url = 'https://www.paystation.co.nz/direct/paystation.dll'
# an "error code" of "0" means "No error - transaction successful"
SUCCESSFUL_RESPONSE_CODE = '0'
Class AleloGateway
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class AleloGateway < Gateway
class_attribute :prelive_url
self.test_url = 'https://sandbox-api.alelo.com.br/alelo/sandbox/'
self.live_url = 'https://api.alelo.com.br/alelo/prd/'
Class PayJunctionV2Gateway
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class PayJunctionV2Gateway < Gateway
self.display_name = 'PayJunction'
self.homepage_url = 'https://www.payjunction.com/'
self.test_url = 'https://api.payjunctionlabs.com/transactions'
Method add_3ds
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def add_3ds(post, options)
if options[:three_d_secure] || options[:execute_threed]
post[:'3ds'] = {}
post[:'3ds'][:enabled] = true
post[:success_url] = options[:callback_url] if options[:callback_url]
- 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_shipping_address
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def add_shipping_address(post, options)
if address = options[:shipping_address]
post[:shipping] = {}
post[:shipping][:address] = {}
post[:shipping][:address][:address_line1] = address[:address1] unless address[:address1].blank?
- 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_billing_address
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def add_billing_address(post, payment, options)
post[:billing_address] = {}
if address = options[:billing_address] || options[:address]
first_name, last_name = split_names(address[:name])
post[:billing_address][:first_name] = first_name if first_name
- 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_settings
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def add_settings(xml, source, options)
xml.transactionSettings do
if options[:recurring] || subsequent_recurring_transaction?(options)
xml.setting do
xml.settingName('recurringBilling')
- 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_3ds
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def add_3ds(post, options)
if three_ds_2_options = options[:three_ds_2]
device_channel = three_ds_2_options[:channel]
if device_channel == 'app'
post[:threeDS2RequestData] = { deviceChannel: device_channel }
- 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_source_owner
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def add_source_owner(post, creditcard, options)
post[:owner] = {}
post[:owner][:name] = creditcard.name if creditcard.respond_to?(:name) && creditcard.name
post[:owner][:email] = options[:email] if options[:email]
- 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 verify
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def verify(creditcard, options = {})
if options[:allow_card_verification] == true
options.delete(:allow_card_verification)
exp_month = creditcard.month.to_s
exp_year = creditcard.year.to_s
- 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_additional_data
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def add_additional_data(params, options)
params['isAuth'] = options[:is_auth].present? ? options[:is_auth] : 'true'
params['paymentType'] = options[:payment_type].present? ? options[:payment_type] : 'Sale'
params['tenderType'] = options[:tender_type].present? ? options[:tender_type] : 'Card'
params['taxExempt'] = options[:tax_exempt].present? ? options[:tax_exempt] : 'false'
- 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_buyer
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def add_buyer(post, payment_method, options)
buyer = {}
if buyer_hash = options[:buyer]
buyer[:fullName] = buyer_hash[:name]
buyer[:dniNumber] = buyer_hash[:dni_number]
- 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_address
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def add_address(post, options)
if address = options[:billing_address]
post[:billingFirstName] = address[:first_name] if address[:first_name]
post[:billingLastName] = address[:last_name] if address[:last_name]
post[:billingCompanyName] = address[:company] if address[:company]
- 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 cenpos.rb
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'nokogiri'
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class CenposGateway < Gateway
Class CardprocessGateway
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class CardprocessGateway < Gateway
self.test_url = 'https://test.vr-pay-ecommerce.de/v1/payments'
self.live_url = 'https://vr-pay-ecommerce.de/v1/payments'
self.supported_countries = %w[ BE BG CZ DK DE EE IE ES FR HR IT CY LV LT LU
Class GlobalTransportGateway
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class GlobalTransportGateway < Gateway
self.test_url = 'https://certapia.globalpay.com/GlobalPay/transact.asmx/ProcessCreditCard'
self.live_url = 'https://api.globalpay.com/GlobalPay/transact.asmx/ProcessCreditCard'
self.supported_countries = %w(CA PR US)
Class NetpayGateway
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class NetpayGateway < Gateway
self.test_url = 'http://200.57.87.243:8855'
self.live_url = 'https://suite.netpay.com.mx/acquirerprd'
# The countries the gateway supports merchants from as 2 digit ISO country codes
Class OpenpayGateway
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class OpenpayGateway < Gateway
class_attribute :mx_live_url, :mx_test_url
class_attribute :co_live_url, :co_test_url
self.co_live_url = 'https://api.openpay.co/v1/'
Class MicropaymentGateway
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class MicropaymentGateway < Gateway
self.display_name = 'micropayment'
self.homepage_url = 'https://www.micropayment.de/'
self.test_url = self.live_url = 'https://sipg.micropayment.de/public/creditcardpsp/v1/nvp/'
Class S5Gateway
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class S5Gateway < Gateway
self.test_url = 'https://test.ctpe.io/payment/ctpe'
self.live_url = 'https://ctpe.io/payment/ctpe'
self.supported_countries = ['DK']