支付通路
This commit is contained in:
1 parent
c7f43e30a9
commit
85b0e70907
26 files changed
+1324
-74
No files matched your search
@@ -66,7 +66,16 @@ export class PaymentsController {
|
||||
res.type('application/xml').send(await this.payments.handleRefundNotify(body));
|
||||
return;
|
||||
}
|
||||
// 地址会收到全部事件(投诉、风控、代币等),其余统一回 success 表示已收到
|
||||
// iOS 退款问询必须 3 秒内表态,否则微信向 Apple 回「不确定」
|
||||
if (body.includes('xpay_subscribe_ios_refund_query_notify')) {
|
||||
const answer = await this.payments.handleIosRefundQuery(body);
|
||||
// 来的是 XML 信封就回 XML,来的是 JSON 就回 JSON
|
||||
res.type(body.trimStart().startsWith('<') ? 'application/xml' : 'application/json').send(answer);
|
||||
return;
|
||||
}
|
||||
// 地址会收到全部事件(投诉、风控、代币等),其余统一回 success 表示已收到。
|
||||
// 先落一条日志,否则这类事件事后完全查不到痕迹。
|
||||
await this.payments.logIgnoredNotify(body);
|
||||
res.type('text/plain').send('success');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user