Skip to content

Instantly share code, notes, and snippets.

@mikesabat
Created December 15, 2013 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikesabat/7976301 to your computer and use it in GitHub Desktop.
Save mikesabat/7976301 to your computer and use it in GitHub Desktop.
Response from Stripe after a cc is entered.
handleStripeResponse: (status, response) ->
if status == 200
$('#user_stripe_card_token').val(response.id)
$('#new_user')[0].submit()
else
$('#stripe_error').text(response.error.message)
$('#stripe_error').show()
$('input[type=submit]').attr('disabled', false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment