wechat->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': PayNotifyLogic::handle('cashierclass', $ciphertext['out_trade_no'], $ciphertext); $app->wechat->success(); break; } } } } }