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'],'/tresponse','Payment::tresponse/');
|
||||||
$routes->match(['get','post'],'/response','Payment::response/');
|
$routes->match(['get','post'],'/response','Payment::response/');
|
||||||
$routes->get('/payment_failure', 'Payment::payment_failure');
|
$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->match(['get','post'],'/subscription_renewal/(:any)','Payment::index/$1');
|
||||||
// $routes->group("api", function ($routes) {
|
// $routes->group("api", function ($routes) {
|
||||||
// // $routes->post("create_products/", "ApiIntegration::save_book_details");
|
// // $routes->post("create_products/", "ApiIntegration::save_book_details");
|
||||||
|
|||||||
@ -127,7 +127,7 @@ public function tresponse() {
|
|||||||
$queryString = http_build_query($paramList);
|
$queryString = http_build_query($paramList);
|
||||||
echo "<b>Transaction status is success</b><br/>";
|
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 {
|
} else {
|
||||||
echo "<b>Processing ...</b><br/>";
|
echo "<b>Processing ...</b><br/>";
|
||||||
$queryString = http_build_query($paramList);
|
$queryString = http_build_query($paramList);
|
||||||
@ -159,7 +159,8 @@ public function payment_failure(){
|
|||||||
return view('/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('session');
|
||||||
helper('financial_year_helper');
|
helper('financial_year_helper');
|
||||||
$subModel = new SubscriptionModel();
|
$subModel = new SubscriptionModel();
|
||||||
@ -304,7 +305,7 @@ public function payment_success() {
|
|||||||
|
|
||||||
log_message('info','sent data' .json_encode($data));
|
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) {
|
public function generateSerialNumber($filtered_data, $financial_year) {
|
||||||
@ -318,8 +319,8 @@ public function generateSerialNumber($filtered_data, $financial_year) {
|
|||||||
$next_id_numeric++;
|
$next_id_numeric++;
|
||||||
return ['serial_number' => $serial_number, 'next_id' => $next_id_numeric];
|
return ['serial_number' => $serial_number, 'next_id' => $next_id_numeric];
|
||||||
}
|
}
|
||||||
public function design(){
|
public function payment_success(){
|
||||||
return view('payment_success_copy');
|
return view('payment_success');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,3 +96,38 @@
|
|||||||
|
|
||||||
</body>
|
</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