提交
This commit is contained in:
@@ -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('订单金额异常');
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user