如何在Laravel 4.2中使用javascript进行全球付款集成而不提交表单来生成令牌?
Worldpay.useForm({
'clientKey': '{{ Config::get("app.worldpay_client_key"); }}',
'form': form,
'reusable': true,
'callback': function (status, response)
{
document.getElementById('card_error').innerHTML = '';
if (response.error)
{
Worldpay.handleError(form, document.getElementById('card_error'), response.error);
}
else
{
var token = response.token;
Worldpay.formBuilder(form, 'input', 'hidden', 'token', token);
form.submit();
}
}
});