FIX_PAYMENT_PAGE_RELOAD
This commit is contained in:
parent
027ecb8dd4
commit
e1ef2def6f
@ -198,7 +198,8 @@ $routes->match(['get','post'],'/pay','Payment::pay/');
|
||||
$routes->match(['get','post'],'/tresponse','Payment::tresponse/');
|
||||
$routes->match(['get','post'],'/response','Payment::response/');
|
||||
$routes->get('/payment_failure', 'Payment::payment_failure');
|
||||
$routes->get('/payment_success','Payment::payment_success');
|
||||
$routes->get('/payment_process','Payment::payment_process');
|
||||
$routes->get('payment_success','Payment::payment_success');
|
||||
$routes->match(['get','post'],'/subscription_renewal/(:any)','Payment::index/$1');
|
||||
// $routes->group("api", function ($routes) {
|
||||
// // $routes->post("create_products/", "ApiIntegration::save_book_details");
|
||||
|
||||
@ -127,7 +127,7 @@ public function tresponse() {
|
||||
$queryString = http_build_query($paramList);
|
||||
echo "<b>Transaction status is success</b><br/>";
|
||||
|
||||
return redirect()->to(base_url('/payment_success?' . $queryString));
|
||||
return redirect()->to(base_url('/payment_process?' . $queryString));
|
||||
} else {
|
||||
echo "<b>Processing ...</b><br/>";
|
||||
$queryString = http_build_query($paramList);
|
||||
@ -159,7 +159,8 @@ public function payment_failure(){
|
||||
return view('/payment_failure');
|
||||
}
|
||||
|
||||
public function payment_success() {
|
||||
public function payment_process() {
|
||||
echo "Do not hit refresh or go back. Confirming your Order";
|
||||
helper('session');
|
||||
helper('financial_year_helper');
|
||||
$subModel = new SubscriptionModel();
|
||||
@ -304,7 +305,7 @@ public function payment_success() {
|
||||
|
||||
log_message('info','sent data' .json_encode($data));
|
||||
|
||||
return view('/payment_success');
|
||||
return redirect()->to(base_url('/payment_success'));
|
||||
}
|
||||
|
||||
public function generateSerialNumber($filtered_data, $financial_year) {
|
||||
@ -318,8 +319,8 @@ public function generateSerialNumber($filtered_data, $financial_year) {
|
||||
$next_id_numeric++;
|
||||
return ['serial_number' => $serial_number, 'next_id' => $next_id_numeric];
|
||||
}
|
||||
public function design(){
|
||||
return view('payment_success_copy');
|
||||
public function payment_success(){
|
||||
return view('payment_success');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -95,4 +95,39 @@
|
||||
<script src="<?= base_url() . "public/assets/js/app.min.js" ?>"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
<script>
|
||||
// Strictly disable the back button
|
||||
history.pushState(null, null, location.href);
|
||||
window.onpopstate = function () {
|
||||
history.pushState(null, null, location.href);
|
||||
};
|
||||
|
||||
// Prevent refresh using Ctrl+R, F5, and right-click reload
|
||||
document.addEventListener("keydown", function (e) {
|
||||
if (e.key === "F5" || (e.ctrlKey && e.key === "r") || e.keyCode === 116) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// Disable right-click menu
|
||||
document.addEventListener("contextmenu", function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// Disable developer tools (F12, Ctrl+Shift+I, Ctrl+Shift+J)
|
||||
document.addEventListener("keydown", function (e) {
|
||||
if (
|
||||
(e.ctrlKey && e.shiftKey && (e.key === "I" || e.key === "i" || e.key === "J" || e.key === "j")) ||
|
||||
e.key === "F12"
|
||||
) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// Periodically check and disable refresh using navigation events
|
||||
setInterval(function () {
|
||||
history.pushState(null, null, location.href);
|
||||
}, 1000);
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user