|
|
|
|
@ -1565,11 +1565,11 @@ class OrdersController extends CommonController
|
|
|
|
|
$customer = $order->customer;
|
|
|
|
|
$currentBalance = (float)$customer->balance;
|
|
|
|
|
|
|
|
|
|
dd(gettype($totalPaid), gettype($currentBalance), $totalPaid == $currentBalance);
|
|
|
|
|
dd(gettype($totalPaid), gettype($currentBalance), float_equals($totalPaid, $currentBalance));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 4. 如果支付总额等于用户余额,进行退款处理
|
|
|
|
|
if ($totalPaid > 0 && floatval($totalPaid) == floatval($currentBalance)) {
|
|
|
|
|
if ($totalPaid > 0 && float_equals($totalPaid, $currentBalance)) {
|
|
|
|
|
foreach ($recharges as $recharge) {
|
|
|
|
|
// 更新用户余额
|
|
|
|
|
$currentBalance -= $recharge->money;
|
|
|
|
|
|