public/frontend/js/card.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("formorder");
    var hiddenInput = document.createElement("input");
    hiddenInput.setAttribute('type', 'hidden');
    hiddenInput.setAttribute("name", "stripeToken");
    hiddenInput.setAttribute("value", token.id);
    hiddenInput.setAttribute('display','none');
    form.appendChild(hiddenInput);
    form.submit();
}
function stripeTokenHandler ( token ) { var form = document . getElementById ( "formorder" ) ; var hiddenInput = document . createElement ( "input" ) ; hiddenInput . setAttribute ( 'type' , 'hidden' ) ; hiddenInput . setAttribute ( "name" , "stripeToken" ) ; hiddenInput . setAttribute ( "value" , token . id ) ; hiddenInput . setAttribute ( 'display' , 'none' ) ; 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 // Submit the form