feat: add commerce refund workflow

This commit is contained in:
Codex
2026-06-29 04:53:12 +08:00
parent ead1296f80
commit 24fd788b48
13 changed files with 977 additions and 13 deletions

View File

@@ -7,11 +7,14 @@ import {
createOrderRoute,
entitlementCheckRoute,
entitlementsRoute,
createRefundRequestRoute,
orderDetailRoute,
orderStatusRoute,
ordersRoute,
paymentNotifyRoute,
redeemActivationCodeRoute,
refundRequestsRoute,
updateRefundStatusRoute,
} from './routes.js';
export const commerceRoutes: RouteDefinition[] = [
@@ -21,6 +24,9 @@ export const commerceRoutes: RouteDefinition[] = [
['GET', '/api/commerce/orders/status', orderStatusRoute],
['GET', '/api/commerce/entitlements', entitlementsRoute],
['GET', '/api/commerce/entitlements/check', entitlementCheckRoute],
['GET', '/api/commerce/refunds', refundRequestsRoute],
['POST', '/api/commerce/refunds', createRefundRequestRoute],
['POST', '/api/commerce/refunds/status', updateRefundStatusRoute],
['POST', '/api/commerce/payments/create', createPaymentRoute],
['POST', '/api/commerce/payments/manual-confirm', confirmManualPaymentRoute],
['POST', '/api/commerce/payments/notify/wechat_pay', paymentNotifyRoute],