Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Pay
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>دفع المبلغ</title>
</head>
<body>
<h1>مرحبًا بك في موقعنا</h1>
<p>يرجى دفع 500 دينار جزائري لمتابعة استخدام الموقع.</p>
<button id="payButton">ادفع الآن</button>

<script>
document.getElementById("payButton").onclick = function() {
fetch('/process-payment', {
method: 'POST'
})
.then(response => response.json())
.then(data => {
if (data.success) {
alert("تم الدفع بنجاح!");
window.location.reload(); // إعادة تحميل الصفحة بعد الدفع
} else {
alert("حدث خطأ أثناء الدفع.");
}
});
};

window.onload = function() {
// تحقق مما إذا كان المستخدم قد دفع
fetch('/check-payment-status')
.then(response => response.json())
.then(data => {
if (!data.paid) {
alert("يجب دفع 500 دينار جزائري لمتابعة استخدام الموقع");
}
});
};
</script>
</body>
</html>