activemerchant/active_merchant

View on GitHub

Showing 1,501 of 1,501 total issues

Method api_request has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

      def api_request(action, request, verb, payment_method_details, options)
Severity: Minor
Found in lib/active_merchant/billing/gateways/blue_snap.rb - About 35 mins to fix

    Method auth_digest has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

          def auth_digest(method, action, post, authorization = nil, options = {})
    Severity: Minor
    Found in lib/active_merchant/billing/gateways/global_collect.rb - About 35 mins to fix

      Method headers has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            def headers(method, action, post, authorization = nil, options = {})
      Severity: Minor
      Found in lib/active_merchant/billing/gateways/global_collect.rb - About 35 mins to fix

        Method add_mobile_credit_card has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

              def add_mobile_credit_card(post, payment, options, specifics_inputs, expirydate)
        Severity: Minor
        Found in lib/active_merchant/billing/gateways/global_collect.rb - About 35 mins to fix

          Method order_request has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                def order_request(action, amount, post, credit_card, options = {})
          Severity: Minor
          Found in lib/active_merchant/billing/gateways/xpay.rb - About 35 mins to fix

            Method authorization_from has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  def authorization_from(success, url, method, response, options)
            Severity: Minor
            Found in lib/active_merchant/billing/gateways/stripe.rb - About 35 mins to fix

              Method auth_or_sale has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                    def auth_or_sale(method, authorization, amount, credit_card, options = {})
              Severity: Minor
              Found in lib/active_merchant/billing/gateways/latitude19.rb - About 35 mins to fix

                Method auth_or_sale has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      def auth_or_sale(post, transaction_type, amount, payment_method, options)
                Severity: Minor
                Found in lib/active_merchant/billing/gateways/payu_latam.rb - About 35 mins to fix

                  Method add_auth_purchase has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        def add_auth_purchase(post, pair_value, money, credit_card_or_reference, options)
                  Severity: Minor
                  Found in lib/active_merchant/billing/gateways/card_stream.rb - About 35 mins to fix

                    Method commit has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                          def commit(method, url, parameters = nil, options = {}, type = false)
                    Severity: Minor
                    Found in lib/active_merchant/billing/gateways/worldpay_online_payments.rb - About 35 mins to fix

                      Method add_address has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                            def add_address(xml, payment_method, address, options, shipTo = false)
                      Severity: Minor
                      Found in lib/active_merchant/billing/gateways/cyber_source.rb - About 35 mins to fix

                        Method add_invoice has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                              def add_invoice(doc, action, money, payment_method, options)
                        Severity: Minor
                        Found in lib/active_merchant/billing/gateways/telr.rb - About 35 mins to fix

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                                def encrypt(key, order_id)
                                  block_length = 8
                                  cipher = OpenSSL::Cipher.new('DES3')
                                  cipher.encrypt
                          
                          
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/redsys.rb and 1 other location - About 35 mins to fix
                          lib/active_merchant/billing/gateways/redsys_rest.rb on lines 488..499

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 36.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                def add_credit_card(xml, payment)
                                  xml.Card do
                                    xml.CardNumber payment.number
                                    xml.ExpirationMonth format(payment.month, :two_digits)
                                    xml.ExpirationYear format(payment.year, :two_digits)
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/vantiv_express.rb and 1 other location - About 35 mins to fix
                          lib/active_merchant/billing/gateways/element.rb on lines 268..274

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 36.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                def add_credit_card(xml, payment)
                                  xml.card do
                                    xml.CardNumber payment.number
                                    xml.ExpirationMonth format(payment.month, :two_digits)
                                    xml.ExpirationYear format(payment.year, :two_digits)
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/element.rb and 1 other location - About 35 mins to fix
                          lib/active_merchant/billing/gateways/vantiv_express.rb on lines 408..414

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 36.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                def purchase(money, payment, options = {})
                                  post = {}
                                  post[:PaymentDealerRequest] = {}
                                  options[:pre_auth] = 0
                                  add_auth_purchase(post, money, payment, options)
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/moka.rb and 1 other location - About 35 mins to fix
                          lib/active_merchant/billing/gateways/moka.rb on lines 64..72

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 36.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      options[:signature_key].to_s +
                                      options[:merchant_id].to_s +
                                      options[:acquirer_bin].to_s +
                                      options[:terminal_id].to_s +
                                      parameters['Num_operacion'].to_s +
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/cecabank/cecabank_xml.rb and 1 other location - About 35 mins to fix
                          lib/active_merchant/billing/gateways/cecabank/cecabank_xml.rb on lines 193..200

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 36.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                def authorize(money, payment, options = {})
                                  post = {}
                                  post[:PaymentDealerRequest] = {}
                                  options[:pre_auth] = 1
                                  add_auth_purchase(post, money, payment, options)
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/moka.rb and 1 other location - About 35 mins to fix
                          lib/active_merchant/billing/gateways/moka.rb on lines 53..61

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 36.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      options[:signature_key].to_s +
                                      options[:merchant_id].to_s +
                                      options[:acquirer_bin].to_s +
                                      options[:terminal_id].to_s +
                                      parameters['Num_operacion'].to_s +
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/cecabank/cecabank_xml.rb and 1 other location - About 35 mins to fix
                          lib/active_merchant/billing/gateways/cecabank/cecabank_xml.rb on lines 204..211

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 36.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                                def encrypt(key, order_id)
                                  block_length = 8
                                  cipher = OpenSSL::Cipher.new('DES3')
                                  cipher.encrypt
                          
                          
                          Severity: Minor
                          Found in lib/active_merchant/billing/gateways/redsys_rest.rb and 1 other location - About 35 mins to fix
                          lib/active_merchant/billing/gateways/redsys.rb on lines 681..692

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 36.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Severity
                          Category
                          Status
                          Source
                          Language