diff --git a/member/modules/v1/controllers/EplpayCallbackController.php b/member/modules/v1/controllers/EplpayCallbackController.php index 4ac168d..489e10d 100644 --- a/member/modules/v1/controllers/EplpayCallbackController.php +++ b/member/modules/v1/controllers/EplpayCallbackController.php @@ -327,6 +327,9 @@ class EplpayCallbackController extends \yii\web\Controller 'user_id' => 0, 'user_type' => 2 ])->one(); + if (!$platformAccount) { + throw new Exception('平台账户不存在'); + } $platformAccount->able_cash = bcsub($platformAccount->able_cash, $chargeCpr->charge_cash, 2); $platformAccount->charge_cash = bcadd($platformAccount->charge_cash, $chargeCpr->charge_cash, 2); $platformAccount->saveOrFail();