Click here to Skip to main content
14,970,515 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to generate stripe token for my stripe payment gateway .How can i do that. I am new to Mvc.Can any one help me . The main form is below.

What I have tried:

<main id="main">
	<section id="left">
		<div id="head">
			<h1>Life has great moments</h1>
			<p>Enjoy them with music!</p>
		</div>
		<h3>Only 9.99$</h3>
	</section>
	<section id="right">
		<h1>Purchase</h1>
		<form action="chekout" method="post">
			<div id="form-card" class="form-field">
				<label for="cc-number">Card number:</label>
				<input id="cc-number" maxlength="19" placeholder="1111 2222 3333 4444" required>
			</div>

			<div id="form-date" class="form-field">
				<label for="expiry-month">Expiry date:</label>
				<div id="date-val">
					<select id="expiry-month" required>
															<option id="trans-label_month" value="" default="default" selected="selected">Month</option>
															<option value="1">01</option>
															<option value="2">02</option>
															<option value="3">03</option>
															<option value="4">04</option>
															<option value="5">05</option>
															<option value="6">06</option>
															<option value="7">07</option>
															<option value="8">08</option>
															<option value="9">09</option>
															<option value="10">10</option>
															<option value="11">11</option>
															<option value="12">12</option>
													</select>
					<select id="expiry-year" required>
															<option id="trans-label_year" value="" default="" selected="selected">Year</option>
													<option value="2018">18</option><option value="2019">19</option><option value="2020">20</option><option value="2021">21</option><option value="2022">22</option><option value="2023">23</option><option value="2024">24</option><option value="2025">25</option><option value="2026">26</option><option value="2027">27</option><option value="2028">28</option><option value="2029">29</option><option value="2030">30</option><option value="2031">31</option><option value="2032">32</option><option value="2033">33</option><option value="2034">34</option><option value="2035">35</option><option value="2036">36</option><option value="2037">37</option><option value="2038">38</option><option value="2039">39</option><option value="2040">40</option><option value="2041">41</option><option value="2042">42</option><option value="2043">43</option><option value="2044">44</option><option value="2045">45</option><option value="2046">46</option><option value="2047">47</option></select>
				</div>
			</div>
			
			<div id="form-sec-code" class="form-field">
				<label for="sec-code">Security code:</label>
				<input type="password" maxlength="3" placeholder="123" required>
			</div>
			
			<button type="submit">Purchase Premium</button>
		</form>
	</section>
</main>
Posted
Updated 28-Nov-20 23:41pm
Comments
Richard MacCutchan 28-Nov-20 9:59am
   
What is a stripe token?
Member 14852747 28-Nov-20 10:45am
   
payment gateway stripe card token
Richard MacCutchan 29-Nov-20 5:33am
   
What is a stripe card token?

1 solution

For any third party SDK/API, always look at their documentation about how to use them: https://stripe.com/docs/api/tokens/create_card[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900