i have some data needed to save and populate a form clicking a button. Concurrently need to submit the form to iPay88 payment page. I tried with the code below, data saved and i got success in console.log but the form doesn't seem to submit as it is not redirect to the payment page.
$('#makePayment').click(function(e){
e.preventDefault();
$.ajax({
url: '/OpenSupermall/public/postOrder',
type: "post",
data: {
'card':$("#paymentForm input[type='radio']:checked").val()
},
success: function(){
console.log('success');
$('#paymentForm').submit();
}
});