Folowing is my ajax call in file: Path: /app/code/Nitesh/Module/view/frontend/web/js/view/payment/method-renderer/payment-method.js
$.ajax({
dataType: 'json',
url: url_submit,
data: data,
async : false,
type: 'post',
success: function(result)
{
if(result != null) {
flag_success = 1;
} else {
flag_success = 0;
window.location.assign(url_redirect);
}
},
});
My placeOrder() fuction is called when flag_success == 1;
if(flag_success == 1){
this.placeOrder();
}
Now when I'm redirecting to url_redirect then I want to place an order after getting response from that redirected url.
Means I want to make value of flag_success = 1; after gettting back from that redirected url.
Also If there is any way to call placeOrder() from controller that also helps me. Because I'm getting response of that redirected url there.
If anyone want more information then I will provide.