diff --git a/docs/PAYMENT.md b/docs/PAYMENT.md index c0fc1fdc..accd4a98 100644 --- a/docs/PAYMENT.md +++ b/docs/PAYMENT.md @@ -90,6 +90,8 @@ Prevents users from repeatedly creating and canceling orders: Each provider type requires different credentials. Select the type when adding a new provider instance in **Provider Management → Add Provider**. +> **Callback URLs are auto-generated**: When adding a provider, the Notify URL and Return URL are automatically constructed from your site domain. You only need to confirm the domain is correct. + ### EasyPay Compatible with any payment service that implements the EasyPay protocol. @@ -99,8 +101,6 @@ Compatible with any payment service that implements the EasyPay protocol. | **Merchant ID (PID)** | EasyPay merchant ID | Yes | | **Merchant Key (PKey)** | EasyPay merchant secret key | Yes | | **API Base URL** | EasyPay API base address | Yes | -| **Notify URL** | Async callback URL for payment success | Yes | -| **Return URL** | Redirect URL after payment completion | No | | **Alipay Channel ID** | Specify Alipay channel (optional) | No | | **WeChat Channel ID** | Specify WeChat channel (optional) | No | @@ -113,8 +113,6 @@ Direct integration with Alipay Open Platform. Supports PC page pay and H5 mobile | **AppID** | Alipay application AppID | Yes | | **Private Key** | RSA2 application private key | Yes | | **Alipay Public Key** | Alipay public key | Yes | -| **Notify URL** | Async callback URL | Yes | -| **Return URL** | Redirect URL after payment | No | ### WeChat Pay (Direct) @@ -125,11 +123,10 @@ Direct integration with WeChat Pay APIv3. Supports Native QR code and H5 payment | **AppID** | WeChat Pay AppID | Yes | | **Merchant ID (MchID)** | WeChat Pay merchant ID | Yes | | **Merchant API Private Key** | Merchant API private key (PEM format) | Yes | -| **Certificate Serial Number** | Merchant certificate serial number | Yes | | **APIv3 Key** | 32-byte APIv3 key | Yes | | **WeChat Pay Public Key** | WeChat Pay public key (PEM format) | Yes | -| **WeChat Pay Public Key ID** | WeChat Pay public key ID | Yes | -| **Notify URL** | Async callback URL | Yes | +| **WeChat Pay Public Key ID** | WeChat Pay public key ID | No | +| **Certificate Serial Number** | Merchant certificate serial number | No | ### Stripe @@ -174,14 +171,16 @@ Payment callbacks are essential for the payment system to work correctly. ### Callback URL Format -| Provider | Callback URL | -|----------|-------------| -| **EasyPay** | `https://your-domain.com/api/v1/payment/easypay/notify` | -| **Alipay (Direct)** | `https://your-domain.com/api/v1/payment/alipay/notify` | -| **WeChat Pay (Direct)** | `https://your-domain.com/api/v1/payment/wxpay/notify` | -| **Stripe** | `https://your-domain.com/api/v1/payment/stripe/webhook` | +When adding a provider, the system auto-generates callback URLs from your site domain: -> Replace `your-domain.com` with your actual domain. +| Provider | Callback Path | +|----------|-------------| +| **EasyPay** | `https://your-domain.com/api/v1/payment/webhook/easypay` | +| **Alipay (Direct)** | `https://your-domain.com/api/v1/payment/webhook/alipay` | +| **WeChat Pay (Direct)** | `https://your-domain.com/api/v1/payment/webhook/wxpay` | +| **Stripe** | `https://your-domain.com/api/v1/payment/webhook/stripe` | + +> Replace `your-domain.com` with your actual domain. For EasyPay / Alipay / WeChat Pay, the callback URL is auto-filled when adding the provider — no manual configuration needed. ### Stripe Webhook Setup diff --git a/docs/PAYMENT_CN.md b/docs/PAYMENT_CN.md index 33a5ace3..2d0371bd 100644 --- a/docs/PAYMENT_CN.md +++ b/docs/PAYMENT_CN.md @@ -90,6 +90,8 @@ Sub2API 内置支付系统,支持用户自助充值,无需部署独立的支 每种服务商需要不同的凭证和参数。在 **服务商管理 → 添加服务商** 中选择类型后填写。 +> **回调地址自动生成**:添加服务商时,异步回调地址(Notify URL)和同步跳转地址(Return URL)由系统根据你的站点域名自动拼接,无需手动填写。管理员只需确认域名正确即可。 + ### EasyPay(易支付) 兼容任何 EasyPay 协议的支付服务商。 @@ -99,8 +101,6 @@ Sub2API 内置支付系统,支持用户自助充值,无需部署独立的支 | **商户 ID(PID)** | EasyPay 商户 ID | 是 | | **商户密钥(PKey)** | EasyPay 商户密钥 | 是 | | **API 地址** | EasyPay API 基础地址 | 是 | -| **异步回调地址** | 支付成功后的回调 URL | 是 | -| **同步跳转地址** | 支付完成后的跳转 URL | 否 | | **支付宝通道 ID** | 指定支付宝通道(可选) | 否 | | **微信通道 ID** | 指定微信通道(可选) | 否 | @@ -115,8 +115,6 @@ Sub2API 内置支付系统,支持用户自助充值,无需部署独立的支 | **AppID** | 支付宝应用 AppID | 是 | | **应用私钥** | RSA2 应用私钥 | 是 | | **支付宝公钥** | 支付宝公钥 | 是 | -| **异步回调地址** | 支付成功后的回调 URL | 是 | -| **同步跳转地址** | 支付完成后的跳转 URL | 否 | ### 微信官方 @@ -127,11 +125,10 @@ Sub2API 内置支付系统,支持用户自助充值,无需部署独立的支 | **AppID** | 微信支付 AppID | 是 | | **商户号(MchID)** | 微信支付商户号 | 是 | | **商户 API 私钥** | 商户 API 私钥(PEM 格式) | 是 | -| **商户证书序列号** | 商户证书序列号 | 是 | | **APIv3 密钥** | 32 位 APIv3 密钥 | 是 | | **微信支付公钥** | 微信支付公钥(PEM 格式) | 是 | -| **微信支付公钥 ID** | 微信支付公钥 ID | 是 | -| **异步回调地址** | 支付成功后的回调 URL | 是 | +| **微信支付公钥 ID** | 微信支付公钥 ID | 否 | +| **商户证书序列号** | 商户证书序列号 | 否 | ### Stripe @@ -176,14 +173,16 @@ Sub2API 内置支付系统,支持用户自助充值,无需部署独立的支 ### 回调地址格式 -| 服务商 | 回调地址 | -|--------|---------| -| **EasyPay** | `https://your-domain.com/api/v1/payment/easypay/notify` | -| **支付宝官方** | `https://your-domain.com/api/v1/payment/alipay/notify` | -| **微信官方** | `https://your-domain.com/api/v1/payment/wxpay/notify` | -| **Stripe** | `https://your-domain.com/api/v1/payment/stripe/webhook` | +添加服务商时,系统会自动根据站点域名拼接回调地址,格式如下: -> 将 `your-domain.com` 替换为你的实际域名。 +| 服务商 | 回调路径 | +|--------|---------| +| **EasyPay** | `https://your-domain.com/api/v1/payment/webhook/easypay` | +| **支付宝官方** | `https://your-domain.com/api/v1/payment/webhook/alipay` | +| **微信官方** | `https://your-domain.com/api/v1/payment/webhook/wxpay` | +| **Stripe** | `https://your-domain.com/api/v1/payment/webhook/stripe` | + +> 将 `your-domain.com` 替换为你的实际域名。EasyPay / 支付宝 / 微信的回调地址在添加服务商时自动填入,无需手动配置。 ### Stripe Webhook 设置