feat(payment): implement Zibal IPG payment gateway integration, admin merchant configuration and verification page
Deploy Canina / deploy (push) Successful in 3m28s
Deploy Canina / deploy (push) Successful in 3m28s
This commit is contained in:
1 parent
03900e726a
commit
8992060cb7
94 files changed
+53456
-29275
No files matched your search
@@ -18,8 +18,11 @@ export default function Settings() {
|
||||
CHARITY_ROUND_STEP: '10000',
|
||||
PAY_GATEWAY_CARD_ENABLE: 'true',
|
||||
PAY_GATEWAY_WALLET_ENABLE: 'true',
|
||||
PAY_GATEWAY_ONLINE_ENABLE: 'false',
|
||||
PAY_GATEWAY_ONLINE_ENABLE: 'true',
|
||||
PAY_GATEWAY_COD_ENABLE: 'false',
|
||||
ZIBAL_MERCHANT: 'zibal',
|
||||
ZIBAL_SANDBOX: 'true',
|
||||
FRONTEND_URL: 'https://canina.ir',
|
||||
CONTACT_PHONE: '۰۲۱-۸۸۸۸ ۴۴۴۴',
|
||||
CONTACT_EMAIL: 'info@canina-iran.com',
|
||||
SOCIAL_WHATSAPP: '09120000000',
|
||||
@@ -52,8 +55,11 @@ export default function Settings() {
|
||||
CHARITY_ROUND_STEP: response.data.data.CHARITY_ROUND_STEP || '10000',
|
||||
PAY_GATEWAY_CARD_ENABLE: response.data.data.PAY_GATEWAY_CARD_ENABLE || 'true',
|
||||
PAY_GATEWAY_WALLET_ENABLE: response.data.data.PAY_GATEWAY_WALLET_ENABLE || 'true',
|
||||
PAY_GATEWAY_ONLINE_ENABLE: response.data.data.PAY_GATEWAY_ONLINE_ENABLE || 'false',
|
||||
PAY_GATEWAY_ONLINE_ENABLE: response.data.data.PAY_GATEWAY_ONLINE_ENABLE || 'true',
|
||||
PAY_GATEWAY_COD_ENABLE: response.data.data.PAY_GATEWAY_COD_ENABLE || 'false',
|
||||
ZIBAL_MERCHANT: response.data.data.ZIBAL_MERCHANT || 'zibal',
|
||||
ZIBAL_SANDBOX: response.data.data.ZIBAL_SANDBOX || 'true',
|
||||
FRONTEND_URL: response.data.data.FRONTEND_URL || 'https://canina.ir',
|
||||
CONTACT_PHONE: response.data.data.CONTACT_PHONE || '۰۲۱-۸۸۸۸ ۴۴۴۴',
|
||||
CONTACT_EMAIL: response.data.data.CONTACT_EMAIL || 'info@canina-iran.com',
|
||||
SOCIAL_WHATSAPP: response.data.data.SOCIAL_WHATSAPP || '09120000000',
|
||||
@@ -220,8 +226,8 @@ export default function Settings() {
|
||||
|
||||
<div className="flex items-center justify-between p-4 bg-gray-50 rounded-xl border border-gray-200">
|
||||
<div>
|
||||
<h4 className="font-bold text-gray-900 text-sm">درگاه آنلاین شتاب</h4>
|
||||
<p className="text-xs text-gray-500 mt-0.5">پرداخت الکترونیک (در صورت غیرفعال بودن: برچسب به زودی)</p>
|
||||
<h4 className="font-bold text-gray-900 text-sm">درگاه آنلاین شتاب (زیبال)</h4>
|
||||
<p className="text-xs text-gray-500 mt-0.5">پرداخت الکترونیک کلیه کارتهای عضو شتاب از طریق زیبال</p>
|
||||
</div>
|
||||
<label className="relative inline-flex items-center cursor-pointer">
|
||||
<input
|
||||
@@ -250,6 +256,54 @@ export default function Settings() {
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Zibal Specific Configuration */}
|
||||
<div className="pt-4 border-t border-gray-100 space-y-4">
|
||||
<div className="flex items-center gap-2 text-indigo-700 font-black text-sm">
|
||||
<span>پیکربندی پایانه پرداخت اینترنتی زیبال (Zibal IPG)</span>
|
||||
{settings.ZIBAL_MERCHANT === 'zibal' && (
|
||||
<span className="bg-amber-100 text-amber-800 text-[10px] px-2 py-0.5 rounded-full font-bold">
|
||||
حالت تستی (Sandbox: zibal)
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 bg-indigo-50/50 p-4 rounded-xl border border-indigo-100">
|
||||
<div>
|
||||
<label className="block text-xs font-bold text-gray-700 mb-1">
|
||||
کد مرچنت زیبال (Merchant ID)
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
value={settings.ZIBAL_MERCHANT}
|
||||
onChange={(e) => setSettings({ ...settings, ZIBAL_MERCHANT: e.target.value })}
|
||||
placeholder="zibal"
|
||||
className="w-full border border-gray-200 rounded-xl p-2.5 outline-none focus:ring-2 focus:ring-purple-500 text-xs font-mono font-bold bg-white"
|
||||
dir="ltr"
|
||||
/>
|
||||
<p className="text-[11px] text-gray-500 mt-1">
|
||||
برای حالت تستی و آزمایش درگاه از مقدار <code>zibal</code> استفاده کنید.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="block text-xs font-bold text-gray-700 mb-1">
|
||||
دامنه فرانتاند / آدرس بازگشت (Frontend Domain)
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
value={settings.FRONTEND_URL}
|
||||
onChange={(e) => setSettings({ ...settings, FRONTEND_URL: e.target.value })}
|
||||
placeholder="https://canina.ir"
|
||||
className="w-full border border-gray-200 rounded-xl p-2.5 outline-none focus:ring-2 focus:ring-purple-500 text-xs font-mono font-bold bg-white"
|
||||
dir="ltr"
|
||||
/>
|
||||
<p className="text-[11px] text-gray-500 mt-1">
|
||||
آدرس دامنهای که کاربر پس از پرداخت از زیبال به آن بازگردانده میشود.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Social Media & Contact Info Settings */}
|
||||
|
||||
Reference in new issue
Block a user