Debugging Simple Javascript (It says Stripe is not defined)



(document).ready(function() { Stripe.setPublishableKey((‘meta[name=“stripe-key”]’).attr(‘content’));
// Watch for a form submission:
("#form-submit-btn").click(function(event) { event.preventDefault(); (‘input[type=submit]’).prop(‘disabled’, true);
var error = false;
var ccNum = ('#card_number').val(), cvcNum = (’#card_code’).val(),
expMonth = ('#card_month').val(), expYear = (’#card_year’).val();
if (!error) {
// Get the Stripe token:
number: ccNum,
cvc: cvcNum,
exp_month: expMonth,
exp_year: expYear
}, stripeResponseHandler);
return false;
}); // form submission
function stripeResponseHandler(status, response) {
// Get a reference to the form:
var f = $("#new_user");
// Get the token from the response:
var token =;
// Add the token to the form:
// Submit the form:


If it says that Stripe is not defined, have you checked how you load Stripe in the first place?


Hate to be that guy, but this is not a place to get Javascript help. There are many forums and communities that would gladly help out with Javascript issues. This is a Cloud9 forums, and this is a board for Cloud9 bugs.