fix : E mandate
This commit is contained in:
@@ -217,21 +217,28 @@ export default function VerifyOtpPage() {
|
|||||||
setIsVerifying(false);
|
setIsVerifying(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const url = "https://apiemandate.kccb.in:9035/EMandate/auth-cbs-resp";
|
||||||
|
console.log("Redirecting (POST) to URL:", url);
|
||||||
|
console.log("POST Body Data:", { data: encoded_data });
|
||||||
|
|
||||||
// Create a form for POST redirect
|
// Create a form for POST redirect
|
||||||
const form = document.createElement("form");
|
const form = document.createElement("form");
|
||||||
form.method = "POST";
|
form.method = "POST";
|
||||||
form.action = "https://apiemandate.kccb.in:9035/EMandate/auth-cbs-resp";
|
form.action = url;
|
||||||
// Add hidden field "data"
|
// Add hidden field "data"
|
||||||
const input = document.createElement("input");
|
const input = document.createElement("input");
|
||||||
input.type = "hidden";
|
input.type = "hidden";
|
||||||
input.name = "data";
|
input.name = "data";
|
||||||
input.value = encoded_data;
|
input.value = encoded_data;
|
||||||
|
|
||||||
form.appendChild(input);
|
form.appendChild(input);
|
||||||
document.body.appendChild(form);
|
document.body.appendChild(form);
|
||||||
|
|
||||||
// Submit → browser navigates to URL using POST
|
// Submit → browser navigates to URL using POST
|
||||||
form.submit();
|
form.submit();
|
||||||
return; // stop further execution
|
return;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
setOtp("");
|
setOtp("");
|
||||||
}
|
}
|
||||||
setIsVerifying(false);
|
setIsVerifying(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user