feat: 订单来源追踪,保存 src_host / src_url 到订单记录
iframe 嵌入充值页面时 URL 自动附带来源参数,写入数据库用于追踪分析。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,8 @@ export interface CreateOrderInput {
|
||||
amount: number;
|
||||
paymentType: PaymentType;
|
||||
clientIp: string;
|
||||
srcHost?: string;
|
||||
srcUrl?: string;
|
||||
}
|
||||
|
||||
export interface CreateOrderResult {
|
||||
@@ -106,6 +108,8 @@ export async function createOrder(input: CreateOrderInput): Promise<CreateOrderR
|
||||
paymentType: input.paymentType,
|
||||
expiresAt,
|
||||
clientIp: input.clientIp,
|
||||
srcHost: input.srcHost || null,
|
||||
srcUrl: input.srcUrl || null,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user