Fix issues identified by Davidson CI
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
require __DIR__ . '/session.php';
|
||||
start_app_session();
|
||||
|
||||
$pageTitle = 'Processing';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<?php require __DIR__ . '/lib/head.php'; ?>
|
||||
<body class="bg-amber-50 min-h-screen flex flex-col">
|
||||
<?php require __DIR__ . '/lib/header.php'; ?>
|
||||
<div class="flex-1 flex flex-col items-center justify-center text-center px-4">
|
||||
<p class="text-lg text-gray-700 mb-4">Your credits are being processed. Please wait.</p>
|
||||
<div class="h-10 w-10 border-4 border-gray-300 border-t-gray-900 rounded-full animate-spin"></div>
|
||||
</div>
|
||||
<?php require __DIR__ . '/lib/footer.php'; ?>
|
||||
<script>
|
||||
function checkPurchaseStatus() {
|
||||
fetch('/api/purchase-boolean.php')
|
||||
.then(function (response) { return response.json(); })
|
||||
.then(function (data) {
|
||||
if (data.result) {
|
||||
window.location.href = '/';
|
||||
} else {
|
||||
setTimeout(checkPurchaseStatus, 3000);
|
||||
}
|
||||
})
|
||||
.catch(function () {
|
||||
setTimeout(checkPurchaseStatus, 3000);
|
||||
});
|
||||
}
|
||||
|
||||
checkPurchaseStatus();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user