A couple of things
- You forgot to include your API 'key' that is required
- you forgot currency and amount and i'd also set locale: 'auto'
- did you remember jquery in the top?
- You should specify a token part function to be called when user has approved payment
See for instance:
stripe.com/docs[
^]
i don't get your form part, if you use '@' does that mean you wanna use Razor viewengine?
If so a form would start something like this:
@using (Html.BeginForm("Action", "Controller", FormMethod.Post))
{
Would you like to use a regular html form? in that case you shouldn't attempt to post to a controller as post is a page based concept, instead you should catch the submit button event and do an ajax post, because you have to get the tripe result on the client before submitting it doesn't add value to consider posting directly if you're using stripe specifically.
<form id="funnyform">
<input type="button" id="mysubmit" value="submit/>
<script type="javascript">
document.getElementById('mysubmit').addEventListener('click', function (e) {
//Do an ajax post to your controller with the values you want from your form and/ or return method invoked by stripe
e.preventDefault();
});
</script>
</form>
Example of ajax post
asp.net mvc - MVC ajax json post to controller action method[
^]