wikimedia/mediawiki-extensions-DonationInterface

View on GitHub
amazon_gateway/amazon.js

Summary

Maintainability
B
6 hrs
Test Coverage

File amazon.js has 281 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*global amazon:true, OffAmazonPayments:true*/
( function ( $, mw ) {
    var clientId = mw.config.get( 'wgAmazonGatewayClientID' ),
        sellerId = mw.config.get( 'wgAmazonGatewaySellerID' ),
        sandbox = mw.config.get( 'wgAmazonGatewaySandbox' ),
Severity: Minor
Found in amazon_gateway/amazon.js - About 2 hrs to fix

    Function submitPayment has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function submitPayment() {
            if ( !mw.donationInterface.validation.validateAmount() ) {
                return;
            }
            if ( !cardSelected ) {
    Severity: Minor
    Found in amazon_gateway/amazon.js - About 1 hr to fix

      Function createWalletWidget has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function createWalletWidget() {
              var params = {
                  sellerId: sellerId,
                  onReady: function ( billingAgreement ) {
                      if ( !cardSelected ) {
      Severity: Minor
      Found in amazon_gateway/amazon.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status