diff --git a/app/Endpoint/Callback/Http/Controllers/YeePayNotifyController.php b/app/Endpoint/Callback/Http/Controllers/YeePayNotifyController.php index a12e96e7..7275b514 100644 --- a/app/Endpoint/Callback/Http/Controllers/YeePayNotifyController.php +++ b/app/Endpoint/Callback/Http/Controllers/YeePayNotifyController.php @@ -3,9 +3,9 @@ namespace App\Endpoint\Callback\Http\Controllers; use App\Enums\WalletToBankLogStatus; -use App\Exceptions\BizException; use App\Models\WalletToBankLog; use App\Services\YeePayService; +use Exception; use Illuminate\Http\Request; use Illuminate\Support\Arr; use Illuminate\Support\Carbon; @@ -54,6 +54,10 @@ class YeePayNotifyController extends Controller return; } + if ($log->status !== WalletToBankLogStatus::Paying) { + return; + } + if ($orderStatus === 'SUCCESS') { $log->update([ 'status' => WalletToBankLogStatus::Success, @@ -85,6 +89,6 @@ class YeePayNotifyController extends Controller return; } - throw new BizException('签名错误'); + throw new Exception('签名错误'); } }