Shopify/active_merchant

View on GitHub

Showing 474 of 1,449 total issues

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

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(250, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/micropayment.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/axcessms.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/forte.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/cenpos.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/moka.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/opp.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(creditcard, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(1, creditcard, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/usa_epay_transaction.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(0, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/clearhaus.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/reach.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(creditcard, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, creditcard, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/card_stream.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/dibs.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/checkout.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(source, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, source, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/beanstream.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/smart_ps.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/credorax.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(creditcard, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, creditcard, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/maxipago.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(creditcard, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, creditcard, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/bridge_pay.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/visanet_peru.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb on lines 71..74
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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 47 locations. Consider refactoring.
Open

      def verify(credit_card, options = {})
        MultiResponse.run(:use_first_response) do |r|
          r.process { authorize(100, credit_card, options) }
          r.process(:ignore_result) { void(r.authorization, options) }
Severity: Major
Found in lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb and 46 other locations - About 15 mins to fix
lib/active_merchant/billing/gateways/airwallex.rb on lines 95..98
lib/active_merchant/billing/gateways/allied_wallet.rb on lines 64..67
lib/active_merchant/billing/gateways/axcessms.rb on lines 52..55
lib/active_merchant/billing/gateways/bank_frick.rb on lines 78..81
lib/active_merchant/billing/gateways/beanstream.rb on lines 109..112
lib/active_merchant/billing/gateways/bridge_pay.rb on lines 70..73
lib/active_merchant/billing/gateways/card_stream.rb on lines 197..200
lib/active_merchant/billing/gateways/cardknox.rb on lines 82..85
lib/active_merchant/billing/gateways/cenpos.rb on lines 76..79
lib/active_merchant/billing/gateways/checkout.rb on lines 86..89
lib/active_merchant/billing/gateways/clearhaus.rb on lines 90..93
lib/active_merchant/billing/gateways/creditcall.rb on lines 106..109
lib/active_merchant/billing/gateways/credorax.rb on lines 232..235
lib/active_merchant/billing/gateways/culqi.rb on lines 81..84
lib/active_merchant/billing/gateways/dibs.rb on lines 62..65
lib/active_merchant/billing/gateways/ezic.rb on lines 72..75
lib/active_merchant/billing/gateways/forte.rb on lines 90..93
lib/active_merchant/billing/gateways/iveri.rb on lines 65..68
lib/active_merchant/billing/gateways/ixopay.rb on lines 65..68
lib/active_merchant/billing/gateways/litle.rb on lines 189..192
lib/active_merchant/billing/gateways/mastercard.rb on lines 64..67
lib/active_merchant/billing/gateways/maxipago.rb on lines 62..65
lib/active_merchant/billing/gateways/merchant_partners.rb on lines 72..75
lib/active_merchant/billing/gateways/merchant_ware_version_four.rb on lines 111..114
lib/active_merchant/billing/gateways/micropayment.rb on lines 57..60
lib/active_merchant/billing/gateways/moka.rb on lines 106..109
lib/active_merchant/billing/gateways/monei.rb on lines 117..120
lib/active_merchant/billing/gateways/mundipagg.rb on lines 86..89
lib/active_merchant/billing/gateways/ncr_secure_pay.rb on lines 61..64
lib/active_merchant/billing/gateways/ogone.rb on lines 207..210
lib/active_merchant/billing/gateways/openpay.rb on lines 73..76
lib/active_merchant/billing/gateways/opp.rb on lines 151..154
lib/active_merchant/billing/gateways/pagarme.rb on lines 66..69
lib/active_merchant/billing/gateways/pay_junction_v2.rb on lines 74..77
lib/active_merchant/billing/gateways/payeezy.rb on lines 117..120
lib/active_merchant/billing/gateways/pro_pay.rb on lines 204..207
lib/active_merchant/billing/gateways/reach.rb on lines 111..114
lib/active_merchant/billing/gateways/s5.rb on lines 92..95
lib/active_merchant/billing/gateways/sage_pay.rb on lines 177..180
lib/active_merchant/billing/gateways/securion_pay.rb on lines 66..69
lib/active_merchant/billing/gateways/smart_ps.rb on lines 79..82
lib/active_merchant/billing/gateways/transact_pro.rb on lines 102..105
lib/active_merchant/billing/gateways/usa_epay_transaction.rb on lines 107..110
lib/active_merchant/billing/gateways/visanet_peru.rb on lines 68..71
lib/active_merchant/billing/gateways/world_net.rb on lines 84..87
lib/active_merchant/billing/gateways/worldpay_us.rb on lines 68..71

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 25.

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