public/js/payment.js
// Submit the form with the token ID.
Submit the form with the token ID.
Submit the form with the token ID .
function stripeTokenHandler(token) {
		var form = document.getElementById('payment-form');
		var hiddenInput = document.createElement('input');
		hiddenInput.setAttribute('type', 'hidden');
		hiddenInput.setAttribute('name', 'payment_token');
		hiddenInput.setAttribute('value', token.id);
		form.appendChild(hiddenInput);
		form.submit();
	}
function stripeTokenHandler ( token ) { var form = document . getElementById ( 'payment-form' ) ; var hiddenInput = document . createElement ( 'input' ) ; hiddenInput . setAttribute ( 'type' , 'hidden' ) ; hiddenInput . setAttribute ( 'name' , 'payment_token' ) ; hiddenInput . setAttribute ( 'value' , token . id ) ; form . appendChild ( hiddenInput ) ; form . submit ( ) ; }
Submit the form with the token ID.
Submit the form with the token ID .
// Insert the token ID into the form so it gets submitted to the server //return false; // Submit the form