$symfony_request = new SymfonyRequest($request->get(), $request->post(), [], $request->cookie(), [], [], $request->rawBody());
$symfony_request->headers = new HeaderBag($request->header());
$this->app->setRequestFromSymfonyRequest($symfony_request);
$server = $this->app->getServer();
$data = $server->getDecryptedMessage();
var_dump($data->Encrypt,$data->toArray()); //这个怎么解密
$response = $server->serve();
return $response->getBody();
加密消息:
string(684) "AX32OVMIozfuT7b7DJ5hLvjhGbAvZ1IHjJ6lfHuESQ2VeukZ04zFwkON5a00lf4FQ1rNTTfSXpoEvWTs8YY9LKyOypWrrB1mjppSIQ9tU6P13xatJgqMLEwBDNL0gSeRe7tdPsoJI+MIj4bUvY9/01PPoxk98MCiHHJfI6e2t/4VxFBIlcj3WhiN1NnqBuU9ahdCJeVOwcqETSAvoQ7Y7QCg3VRFSh7mVBFbAk456WM190eMBAjsJx+frvqfxv21jvFkVKKUr4/yt++v0+6fbeRKqhnekbBzb5lB18SDxTtkp4ZbtfTsmO/XYH8mj+HN5glAajdFTVvhGXyLFEOAvwgCZyL6frEsbKnhr5x1i2Y6G6OdK0T6L/cT7tpE75NrixmowE7mrs66FolSJqNAUdPcDmgoBifG7HUCt17ljBL47CTltYyeO4O/sh1xXksABLEJLKOTc9FAmk+FBwVwjlUx/HzxKDhxzoCrVWjt372PE1M737yriLVQ0RJtGssOZNvVMzywaXio20BKJdPqcHO44QG3GYU/u6aAIo/ofFOXJk13O8zNFThFDGQulAOJ2Rx7FTHu7qa3lAN4gDV+qElQcRazTPPKT3zWNS4rmxigpdRx4MSY7MebvNg57gMcpfJSRb9mV6H87vcCnAdOimQkjdACq++jAAe2I/rOkF8="
array(2) {
["ToUserName"]=>
string(15) "gh_65bf8a9bc75a"
["Encrypt"]=>
string(684) "AX32OVMIozfuT7b7DJ5hLvjhGbAvZ1IHjJ6lfHuESQ2VeukZ04zFwkON5a00lf4FQ1rNTTfSXpoEvWTs8YY9LKyOypWrrB1mjppSIQ9tU6P13xatJgqMLEwBDNL0gSeRe7tdPsoJI+MIj4bUvY9/01PPoxk98MCiHHJfI6e2t/4VxFBIlcj3WhiN1NnqBuU9ahdCJeVOwcqETSAvoQ7Y7QCg3VRFSh7mVBFbAk456WM190eMBAjsJx+frvqfxv21jvFkVKKUr4/yt++v0+6fbeRKqhnekbBzb5lB18SDxTtkp4ZbtfTsmO/XYH8mj+HN5glAajdFTVvhGXyLFEOAvwgCZyL6frEsbKnhr5x1i2Y6G6OdK0T6L/cT7tpE75NrixmowE7mrs66FolSJqNAUdPcDmgoBifG7HUCt17ljBL47CTltYyeO4O/sh1xXksABLEJLKOTc9FAmk+FBwVwjlUx/HzxKDhxzoCrVWjt372PE1M737yriLVQ0RJtGssOZNvVMzywaXio20BKJdPqcHO44QG3GYU/u6aAIo/ofFOXJk13O8zNFThFDGQulAOJ2Rx7FTHu7qa3lAN4gDV+qElQcRazTPPKT3zWNS4rmxigpdRx4MSY7MebvNg57gMcpfJSRb9mV6H87vcCnAdOimQkjdACq++jAAe2I/rOkF8="
}
折磨了很久,哪位好心大佬帮帮我。。。😔😔😔
// 推送消息,已解密
返回:
😭😭😭😭😭怎么办呀
$message = $server->getDecryptedMessage(); 这个就是解密后的消息啊 6.5.0+
我这个是虚拟支付的推送,可能他们这个消息没办法解密。。。😶