Possible Duplicate:
How t开发者_StackOverflow中文版o do two POST requests for visitors with JS disabled on one submit button?
In a page I have a form with "Shipping Information" and then a PayPal button. For Shipping Information I have also a checkbox "save this to your profile". I need that if the checkbox is checked to save shipping information in database and just after this to send form to PayPal.
Also would be really helpful to send shipping information to PayPal so I can get back then shipping address from PayPal (to save all this in order)
I hope it will be helpfull for you.
$('#payment_form).submit(function()
{
if($('.checkbox',this).is(':checked'))
{
var formData=$(this).serialize();
$.ajax({
url: 'your.url.com',
data: formData,
type: 'get',
async: false,
complete: function()
{
alert('Now you will be redirected to PayPal');
}
});
}
return true;
});
If this solution doesn't work for you, then you have to integrate PayPal Pro into your website
精彩评论