diff --git a/app/Jobs/HandleAlipayResultNotice.php b/app/Jobs/HandleAlipayResultNotice.php index 2ee61552..60b41c46 100755 --- a/app/Jobs/HandleAlipayResultNotice.php +++ b/app/Jobs/HandleAlipayResultNotice.php @@ -62,8 +62,9 @@ class HandleAlipayResultNotice implements ShouldQueue return; } + $tradeStatus = Arr::get($this->data, 'trade_status', ''); $paystate = PayState::ERROR; - if ($aliNotice->trade_status == 'TRADE_SUCCESS') { + if ($tradeStatus == 'TRADE_SUCCESS') { $paystate = PayState::SUCCESS; if (!bc_equal($recharge->pay_money, $this->data['receipt_amount'])) { $paystate = PayState::UNEQUAL; @@ -104,7 +105,7 @@ class HandleAlipayResultNotice implements ShouldQueue $aliNotice->response = $this->data; $aliNotice->save(); - if ($recharge->pay_state == PayState::SUCCESS) { + if ($paystate == PayState::SUCCESS) { $recharge = $rechargeObj->where('recharge_sn', $rechargeSn)->first(); SellerWalletService::recharge($recharge); }