callback(Request()->post()); if($result && $result->event_type=='TRANSACTION.SUCCESS'){ $ciphertext=$result->resource['ciphertext']; if ($ciphertext['trade_state'] === 'SUCCESS') { $extra['transaction_id'] = $ciphertext['transaction_id']; $attach = $ciphertext['attach']; switch ($attach) { case 'cashierclass': $order = Cashierclass::where(['number' => $ciphertext['out_trade_no']])->findOrEmpty(); if ($order->isEmpty() || $order->paid == PayEnum::ISPAID) { return true; } PayNotifyLogic::handle('cashierclass', $ciphertext['out_trade_no'], $ciphertext); Pay::wechat()->success(); break; } } } // return (new WeChatPayService(UserTerminalEnum::WECHAT_MMP))->notify(); } }