Răsfoiți Sursa

📝 docs(payment): update wechat payment refund integration documentation

- replace API endpoint specifications with direct service call details
- update parameter format from JSON to TypeScript code example
- remove API response format and add service return result type
- update call location to `order.mt.service.ts:210-217`
yourname 1 lună în urmă
părinte
comite
1a0ddd560a

+ 14 - 21
docs/stories/011.003.wechat-payment-refund-integration.story.md

@@ -62,32 +62,25 @@ Draft
   - `state`: 退款状态 (1-退款中, 2-退款成功, 3-退款失败)
 
 ### API Specifications
-**退款API端点** [Source: architecture/api-design-integration.md]
-- **方法**: POST
-- **端点**: `/api/v1/payment/refund`
-- **认证**: JWT Bearer Token
-- **请求格式**:
-  ```json
-  {
-    "orderNo": "订单号",
-    "refundAmount": 退款金额,
-    "reason": "退款原因"
-  }
+**退款服务调用**
+- **调用方式**: 服务层直接调用 `PaymentMtService.refund()`
+- **调用位置**: `packages/orders-module-mt/src/services/order.mt.service.ts:210-217`
+- **参数**:
+  ```typescript
+  await paymentService.refund(
+    tenantId,
+    order.orderNo,
+    order.payAmount
+  )
   ```
-- **响应格式**:
-  ```json
+- **返回结果**:
+  ```typescript
   {
-    "refundId": "退款ID",
-    "refundTransactionId": "微信退款流水号",
-    "status": "退款状态"
+    refund_id: string;     // 微信退款流水号
+    out_refund_no: string; // 商户退款订单号
   }
   ```
 
-**退款回调端点**
-- **方法**: POST
-- **端点**: `/api/v1/payment/refund-callback`
-- **处理微信支付退款回调通知**
-
 ### Component Specifications
 **PaymentMtService** [Source: packages/mini-payment-mt/src/services/payment.mt.service.ts]
 - 现有方法: