feat(payment): integrate epay (易支付) gateway for CNY recharges
release / release (release) Canceled after 0s

- new EpayClient: V1 md5 signing, submit.php page pay, api.php order query
- create/verify epay payment links with CNY exchange-rate conversion
- signed async notify handler (/admin/payment/callback_epay) with amount
  check plus idempotent crediting, and a gateway query fallback
- epay channel config form, channel row and payment_method enum extended
- RechargeModal: send payment_method (was payment_channel, so every recharge
  fell through to Stripe and 500'd) and re-enable the channel picker
- payment config encryption key moved to a local .env, never committed
This commit is contained in:
jinghui committed 2026-11-13 15:17:05 +08:00
1 parent 1fbb6711f2
commit 721a2be32b
12 files changed
+770 -12

No files matched your search

@@ -4,6 +4,7 @@ import React from "react";
import { StripeConfigForm } from "../payment/StripeConfigForm";
import { AlipayConfigForm } from "../payment/AlipayConfigForm";
import { WechatConfigForm } from "../payment/WechatConfigForm";
import { EpayConfigForm } from "../payment/EpayConfigForm";
import { usePaymentChannelManagement } from "@/hooks/usePaymentChannelManagement";
interface PaymentChannelsContentProps {
@@ -17,12 +18,15 @@ export const PaymentChannelsContent: React.FC<PaymentChannelsContentProps> = ({
stripeConfig,
alipayConfig,
wechatConfig,
epayConfig,
isWechatSaving,
isStripeSaving,
isAlipaySaving,
isEpaySaving,
saveStripeConfig,
saveAlipayConfig,
saveWechatConfig,
saveEpayConfig,
enableChannel,
disableChannel,
} = usePaymentChannelManagement();
@@ -38,6 +42,15 @@ export const PaymentChannelsContent: React.FC<PaymentChannelsContentProps> = ({
isLoading={isStripeSaving}
labelPlacement={labelPlacement}
/>
{/* epay (易支付) configuration */}
<EpayConfigForm
config={epayConfig}
onSave={saveEpayConfig}
onEnable={enableChannel}
onDisable={disableChannel}
isLoading={isEpaySaving}
labelPlacement={labelPlacement}
/>
{/* coming soon */}
{/* alipay configuration */}
{/* <AlipayConfigForm