sharetribe/sharetribe

View on GitHub
app/assets/javascripts/stripe_payment.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function handleCreatedPaymentIntent has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  var handleCreatedPaymentIntent = function(response) {
    var payment = response.stripe_payment_intent;
    if (payment.error) {
      showError(ST.t('error_messages.stripe.generic_error'));
    } else if (payment.requires_action) {
Severity: Minor
Found in app/assets/javascripts/stripe_payment.js - About 1 hr to fix

    Function initIntent has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var initIntent = function(options){
        stripe = Stripe(options.publishable_key);
        var card = createCard();
        var form = $("#transaction-form");
    
    
    Severity: Minor
    Found in app/assets/javascripts/stripe_payment.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status