This commit is contained in:
gaofeng
2026-09-15 10:02:52 +08:00
parent 5be2b76d88
commit b218a5a9d7
2 changed files with 16 additions and 1 deletions

View File

@@ -83,7 +83,12 @@ class Order extends Base
return $this->fail((string)($detail['msg'] ?? '操作失败'), intval($detail['code'] ?? 0), $detail['data'] ?? []);
}
$money = $service->payMoney((array)($detail['data'] ?? []));
$order = (array)($detail['data'] ?? []);
if (intval($order['pay_status'] ?? $order['order']['pay_status'] ?? 0) === 1) {
return $this->fail('订单已支付,请刷新查看办理进度');
}
$money = $service->payMoney($order);
if ($money === '') {
return $this->fail('订单金额异常');
}

View File

@@ -77,6 +77,16 @@ class OrderService
$data['business'] = $business;
$data['business_text'] = $business === 'esta' ? 'ESTA' : 'EVUS';
$paid = intval($data['pay_status'] ?? $data['order']['pay_status'] ?? 0) === 1;
$status = $data['order_status'] ?? $data['order']['order_status'] ?? null;
// Correct only the display label; preserve the original workflow and payment fields.
if ($paid && $status !== null && in_array((string)$status, ['0', '10'], true)) {
$data['order_status_text'] = '已支付';
if (isset($data['order']) && is_array($data['order'])) {
$data['order']['order_status_text'] = '已支付';
}
}
return ['code' => 1, 'msg' => 'ok', 'data' => $data];
}