Merge branch 'high-performance' of https://github.com/Traceworks2023/nxtgauge-admin-solid into high-performance
This commit is contained in:
commit
2f042bbc15
1 changed files with 10 additions and 16 deletions
|
|
@ -13,10 +13,10 @@ type PaymentGatewayConfig = {
|
|||
};
|
||||
|
||||
const DEFAULT_CONFIG: PaymentGatewayConfig = {
|
||||
provider: 'BeepScepter',
|
||||
provider: 'Razorpay',
|
||||
mode: 'sandbox',
|
||||
enabled: true,
|
||||
baseUrl: '',
|
||||
baseUrl: 'https://api.razorpay.com',
|
||||
callbackUrl: '',
|
||||
webhookUrl: '',
|
||||
merchantId: '',
|
||||
|
|
@ -26,16 +26,10 @@ const DEFAULT_CONFIG: PaymentGatewayConfig = {
|
|||
|
||||
const READ_ENDPOINTS = [
|
||||
'/api/admin/payment-gateway-config',
|
||||
'/api/admin/settings/payment-gateway',
|
||||
'/api/admin/system-config/payment-gateway',
|
||||
'/api/gateway/admin/payment-gateway-config',
|
||||
];
|
||||
|
||||
const WRITE_ENDPOINTS = [
|
||||
'/api/admin/payment-gateway-config',
|
||||
'/api/admin/settings/payment-gateway',
|
||||
'/api/admin/system-config/payment-gateway',
|
||||
'/api/gateway/admin/payment-gateway-config',
|
||||
];
|
||||
|
||||
function authHeaders() {
|
||||
|
|
@ -151,7 +145,7 @@ export default function PaymentGatewayManagementPage() {
|
|||
<div class="w-full space-y-6 pb-8">
|
||||
<div style="margin-bottom:1.5rem">
|
||||
<h1 class="text-[28px] font-bold leading-tight text-[#111827]">Payment Gateway Management</h1>
|
||||
<p class="mt-1 text-[14px] text-[#6B7280]">Manage provider credentials and callback URLs for platform payments.</p>
|
||||
<p class="mt-1 text-[14px] text-[#6B7280]">Manage Razorpay credentials, mode, and callback URLs for platform payments.</p>
|
||||
</div>
|
||||
|
||||
<Show when={error()}>
|
||||
|
|
@ -169,7 +163,7 @@ export default function PaymentGatewayManagementPage() {
|
|||
<form onSubmit={save} class="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
<div>
|
||||
<label class={labelCls}>Provider</label>
|
||||
<input class={inputCls} value={cfg().provider} onInput={(e) => setField('provider', e.currentTarget.value)} />
|
||||
<input class={inputCls} value={cfg().provider} onInput={(e) => setField('provider', e.currentTarget.value)} placeholder="Razorpay" />
|
||||
</div>
|
||||
<div>
|
||||
<label class={labelCls}>Mode</label>
|
||||
|
|
@ -179,19 +173,19 @@ export default function PaymentGatewayManagementPage() {
|
|||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class={labelCls}>Base URL</label>
|
||||
<label class={labelCls}>Base API URL</label>
|
||||
<input class={inputCls} value={cfg().baseUrl} onInput={(e) => setField('baseUrl', e.currentTarget.value)} placeholder="https://api.provider.com" />
|
||||
</div>
|
||||
<div>
|
||||
<label class={labelCls}>Merchant ID</label>
|
||||
<input class={inputCls} value={cfg().merchantId} onInput={(e) => setField('merchantId', e.currentTarget.value)} />
|
||||
<label class={labelCls}>Merchant / Account ID</label>
|
||||
<input class={inputCls} value={cfg().merchantId} onInput={(e) => setField('merchantId', e.currentTarget.value)} placeholder="Optional internal reference" />
|
||||
</div>
|
||||
<div>
|
||||
<label class={labelCls}>API Key</label>
|
||||
<input class={inputCls} value={cfg().apiKey} onInput={(e) => setField('apiKey', e.currentTarget.value)} />
|
||||
<label class={labelCls}>Razorpay Key ID</label>
|
||||
<input class={inputCls} value={cfg().apiKey} onInput={(e) => setField('apiKey', e.currentTarget.value)} placeholder="rzp_test_xxxxx" />
|
||||
</div>
|
||||
<div>
|
||||
<label class={labelCls}>Secret Key</label>
|
||||
<label class={labelCls}>Razorpay Key Secret</label>
|
||||
<div class="flex gap-2">
|
||||
<input
|
||||
type={showSecret() ? 'text' : 'password'}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue