if (x && x.overrideMimeType) { x.overrideMimeType("application/x-www-form-urlencoded"); } }, success: function(result) { var result_data =JSON.stringify( result ); var obj = JSON.parse(result_data); if(obj.result=='success') { window.location.replace("https://cashierui-api.boipapaymentgateway.com/ui/cashier?token="+obj.token+"&merchantId=892914&paymentSolutionId=500&integrationMode=standalone"); } else{ alert('Failed to send the form data'); return false; } return false; } }); }); }); })(jQuery);