支付方式完善

This commit is contained in:
2026-06-05 18:24:41 +08:00
parent c76bd5416a
commit 07abf2abca
7 changed files with 44 additions and 12 deletions
@@ -43,6 +43,11 @@ class OrderLogic
if (!in_array($channel, ['normal', 'fubei'], true)) {
$channel = 'normal';
}
// 创建方式(三值):normal 普通订单 / wechat_work 企业微信对外收款 / fubei 付呗;非法值兜底 normal
$createType = (string)($params['create_type'] ?? 'normal');
if (!in_array($createType, ['normal', 'wechat_work', 'fubei'], true)) {
$createType = 'normal';
}
$requirePaymentSlipAudit = (int)($params['require_payment_slip_audit'] ?? 0) === 1;
$order = new Order();
@@ -51,6 +56,7 @@ class OrderLogic
$order->creator_id = $params['creator_id'];
$order->order_type = $params['order_type'];
$order->amount = $params['amount'];
$order->create_type = $createType;
// 付呗且申请审核支付单:待审核(5);否则待支付(1)
if ($channel === 'fubei') {
$order->payment_method = 'fubei';