- Add ZarinpalService for production payment gateway - Add MockZarinpalService for testing without real merchant ID - Add MockGatewayController for simulating payment page - Add beautiful mock gateway UI with RTL support - Update PaymentController to switch between mock/real based on config - Fix double-click bug: prevent re-processing completed transactions - Add payment-result page with success/failure UI - All API endpoints tested successfully: * balance, transactions, activity-log * admin-adjust (deposit/withdrawal) * freeze/unfreeze * online payment redirect + callback + verify - Wallet balance verified: 67,700,000 IRR after all transactions - 5 transactions recorded with correct gateways (manual/zarinpal) Closes: Payment gateway integration for Phase 2
124 lines
4.3 KiB
PHP
124 lines
4.3 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="fa" dir="rtl">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>🔐 درگاه پرداخت شبیهسازی شده - IFNEX</title>
|
|
<style>
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
body {
|
|
font-family: Tahoma, Arial, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
.gateway-card {
|
|
background: white;
|
|
border-radius: 16px;
|
|
padding: 40px;
|
|
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
|
max-width: 420px;
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
.logo {
|
|
font-size: 48px;
|
|
margin-bottom: 10px;
|
|
}
|
|
h1 { color: #333; font-size: 22px; margin-bottom: 8px; }
|
|
.subtitle { color: #888; font-size: 13px; margin-bottom: 30px; }
|
|
.amount-box {
|
|
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
color: white;
|
|
padding: 25px;
|
|
border-radius: 12px;
|
|
margin: 20px 0;
|
|
}
|
|
.amount-box .label { font-size: 14px; opacity: 0.9; margin-bottom: 8px; }
|
|
.amount-box .value { font-size: 32px; font-weight: bold; }
|
|
.amount-box .unit { font-size: 16px; opacity: 0.8; margin-right: 5px; }
|
|
.authority {
|
|
background: #f5f5f5;
|
|
padding: 10px;
|
|
border-radius: 8px;
|
|
font-size: 11px;
|
|
color: #666;
|
|
margin: 20px 0;
|
|
word-break: break-all;
|
|
font-family: monospace;
|
|
}
|
|
.buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 25px; }
|
|
.btn {
|
|
padding: 16px 24px;
|
|
border: none;
|
|
border-radius: 10px;
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
text-decoration: none;
|
|
display: block;
|
|
font-family: inherit;
|
|
}
|
|
.btn-success { background: #10b981; color: white; }
|
|
.btn-success:hover { background: #059669; transform: translateY(-2px); }
|
|
.btn-danger { background: #ef4444; color: white; }
|
|
.btn-danger:hover { background: #dc2626; transform: translateY(-2px); }
|
|
.warning {
|
|
background: #fef3c7;
|
|
border: 1px solid #f59e0b;
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
font-size: 12px;
|
|
color: #92400e;
|
|
margin-top: 20px;
|
|
}
|
|
.test-badge {
|
|
display: inline-block;
|
|
background: #fee2e2;
|
|
color: #991b1b;
|
|
padding: 4px 12px;
|
|
border-radius: 20px;
|
|
font-size: 11px;
|
|
font-weight: bold;
|
|
margin-bottom: 10px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="gateway-card">
|
|
<div class="logo">🔐</div>
|
|
<span class="test-badge">🧪 محیط تست (Mock)</span>
|
|
<h1>درگاه پرداخت IFNEX</h1>
|
|
<p class="subtitle">شبیهساز زرینپال — تراکنش واقعی انجام نمیشود</p>
|
|
|
|
<div class="amount-box">
|
|
<div class="label">مبلغ قابل پرداخت</div>
|
|
<div class="value">
|
|
{{ number_format($amount) }}
|
|
<span class="unit">ریال</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="authority">
|
|
Authority: {{ $authority }}
|
|
</div>
|
|
|
|
<div class="buttons">
|
|
<a href="{{ url('/api/v1/payment/mock-gateway/success?authority=' . $authority) }}" class="btn btn-success">
|
|
✅ پرداخت موفق
|
|
</a>
|
|
<a href="{{ url('/api/v1/payment/mock-gateway/failure?authority=' . $authority) }}" class="btn btn-danger">
|
|
❌ انصراف از پرداخت
|
|
</a>
|
|
</div>
|
|
|
|
<div class="warning">
|
|
⚠️ این صفحه فقط برای تست است. در محیط Production، کاربر به درگاه واقعی زرینپال هدایت میشود.
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |