<commit_before>$(document).ready(function () {

  var amount

  var handler = StripeCheckout.configure({
    key: $('input[type=hidden]').data('key'),
    image: '/static/img/logos/n-64.png',
    token: function(token, args) {
      token.amount = amount

      $.ajax({
        url: '/joinwhoshiring'
      , data: JSON.stringify(token)
      , type: 'POST'
      })
      .done(function (resp) {
        $('section').hide()
        $('h1:last').after('<h2 style="color: green;">Thank you for your payment! We\'ll get back to you soon.</h2>')
      })
      .error(function (resp) {
        $('section').hide()
        $('h1:last').after('<h2 style="color: red;">Something went wrong. Please contact us at <a href="mailto:<EMAIL>"><EMAIL></a>.</h2>')
      })
    }
  });

  $('#one-month').click(function (e) {
    amount = 35000;

    handler.open({
      name: 'npm, Inc.',
      description: "Pay $350 for 1 month of advertising",
      amount: amount
    });
    e.preventDefault();
  });

  $('#three-months').click(function (e) {
    amount = 100000

    handler.open({
      name: 'npm, Inc.',
      description: "Pay $1000 for 3 months of advertising",
      amount: amount
    });
    e.preventDefault();
  });

  $('#starter-pack').click(function (e) {
    handler.open({
      name: 'npm, Inc.',
      description: "Enterprise Starter License, $25/month",
      allowRememberMe: false,
      panelLabel: "Subscribe",
      amount: amount
    });
    e.preventDefault();
  });

})


<commit_msg>Payments.js needs to submit to a different endpoint for starter pack<commit_after>$(document).ready(function () {

  var amount
  var paymentEndpoint

  var handler = StripeCheckout.configure({
    key: $('input[type=hidden]').data('key'),
    image: '/static/img/logos/n-64.png',
    token: function(token, args) {
      token.amount = amount

      $.ajax({
        url: paymentEndpoint
      , data: JSON.stringify(token)
      , type: 'POST'
      })
      .done(function (resp) {
        $('section').hide()
        $('h1:last').after('<h2 style="color: green;">Thank you for your payment! We\'ll get back to you soon.</h2>')
      })
      .error(function (resp) {
        $('section').hide()
        $('h1:last').after('<h2 style="color: red;">Something went wrong. Please contact us at <a href="mailto:<EMAIL>"><EMAIL></a>.</h2>')
      })
    }
  });

  $('#one-month').click(function (e) {
    amount = 35000;
    paymentEndpoint = '/joinwhoshiring'

    handler.open({
      name: 'npm, Inc.',
      description: "Pay $350 for 1 month of advertising",
      amount: amount
    });
    e.preventDefault();
  });

  $('#three-months').click(function (e) {
    amount = 100000
    paymentEndpoint = '/joinwhoshiring'

    handler.open({
      name: 'npm, Inc.',
      description: "Pay $1000 for 3 months of advertising",
      amount: amount
    });
    e.preventDefault();
  });

  $('#starter-pack').click(function (e) {
    paymentEndpoint = '/enterprise/starter'

    handler.open({
      name: 'npm, Inc.',
      description: "Enterprise Starter License, $25/month",
      allowRememberMe: false,
      panelLabel: "Subscribe",
      amount: amount
    });
    e.preventDefault();
  });

})



{'fraction_non_alphanumeric': 0.1807716241443684, 'fraction_numerical': 0.018668326073428748, 'mean_word_length': 2.6083052749719418, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4081867', 'n_tokens_mistral': 1071, 'n_tokens_neox': 1000, 'n_words': 234}