Instead of saving the token itself, I recommend creating a customer and saving your customer ID. You can then charge your customer at any time in the future. See our documentation on saving card details for later.
In javscript file how we handle stripeResponseHandler and function stripeResponseHandler(status, response).
You will need to create a function and pass it as your stripeResponseHandler
when calling createToken
. All this function needs to do is insert your token into your form and submit it. There’s a simple example of that here: https://gist.github.com/boucher/1750375