yansongda / pay

可能是我用过的最优雅的 Alipay/WeChat/Douyin/Unipay/江苏银行 的支付 SDK 扩展包了
http://pay.yansongda.cn
MIT License
5.06k stars 1.04k forks source link

swoole下message吃数据 直接把steam变为空了 #946

Closed hanwenbo closed 8 months ago

hanwenbo commented 8 months ago

包版本号

3.6.3

问题描述

swoole下message吃数据 直接把steam变为空了 verify_wechat_sign(ResponseInterface|ServerRequestInterface $message, $message->getBody和外面打印swoole的steam不同 到verify_wechat_sign方法里steam就变为空了

你的代码

$psr7Request = $this->request(); var_dump('-------',$psr7Request->getBody()); $psr7Request->withBody($psr7Request->getBody()); // 由于swoole的request header是小写,所以需要转换成小写 $header = $this->request->header(); $psr7Request->withHeader('Wechatpay-Nonce', $header['wechatpay-nonce']); $psr7Request->withHeader('Wechatpay-Serial', $header['wechatpay-serial']); $psr7Request->withHeader('Wechatpay-Signature', $header['wechatpay-signature']); $psr7Request->withHeader('Wechatpay-Signature-Type', $header['wechatpay-signature-type']); $psr7Request->withHeader('Wechatpay-Timestamp', $header['wechatpay-timestamp']); var_dump('1111',$psr7Request->getBody()); $result = YansongdaPay::wechat()->callback($psr7Request,$params);

报错详情

外部 object(EasySwoole\Http\Message\Stream)#118 (6) { ["stream":"EasySwoole\Spl\SplStream":private]=> resource(153) of type (stream)

到pay库里后 object(EasySwoole\Http\Message\Stream)#118 (5) { ["seekable":"EasySwoole\Spl\SplStream":private]=> bool(false) ["readable":"EasySwoole\Spl\SplStream":private]=> bool(false)

sdk 日志

报错了

nginx/apache 日志

涉及到 异步通知、同步通知 的问题,请贴出来 没涉及

hanwenbo commented 8 months ago

resource(153) of type (stream) 代表不是空的 但是到里面就空了 不知道为什么

yansongda commented 8 months ago

$psr7Request = $this->request();

请问这个确定是支持 psr7 的对象么?

PS:最好把 sdk 的日志也帮忙贴一下

hanwenbo commented 8 months ago

@yansongda

$psr7Request = $this->request();

请问这个确定是支持 psr7 的对象么?

我确定是, https://github.com/easy-swoole/http/blob/3.x/src/Message/Message.php 这是原文件

$psr7Request = $this->request(); $psr7Request->getBody 和 里面 getBody 不一样

我怀疑是不是大火箭clone没过去 我看代码里有火箭clone 因为魔术方法比较多 我没能自查到是什么原因 我看了大概5个小时了

hanwenbo commented 8 months ago

日志默认的不执行 我现在去修复下 一会再来

hanwenbo commented 8 months ago

@yansongda 日志来了

2024-03-13T21:38:40.881606+08:00 > yansongda.artful.DEBUG > [Wechat][V3][CallbackPlugin] 插件开始装载 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":null,"method":null,"headers":null,"body":""},"params":{"_request":{},"_params":null},"payload":[],"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}}}

2024-03-13T21:38:40.888592+08:00 > yansongda.artful.DEBUG > [Wechat][StartPlugin] 插件开始装载 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":null,"method":null,"headers":null,"body":""},"params":[],"payload":[],"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}}}

2024-03-13T21:38:40.888911+08:00 > yansongda.artful.INFO > [Wechat][StartPlugin] 插件装载完毕 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":null,"method":null,"headers":null,"body":""},"params":[],"payload":[],"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}}}

2024-03-13T21:38:40.889137+08:00 > yansongda.artful.DEBUG > [Wechat][V3][WechatPublicCertsPlugin] 插件开始装载 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":null,"method":null,"headers":null,"body":""},"params":[],"payload":[],"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}}}

2024-03-13T21:38:40.889360+08:00 > yansongda.artful.INFO > [Wechat][V3][WechatPublicCertsPlugin] 插件装载完毕 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":null,"method":null,"headers":null,"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates"},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}}}

2024-03-13T21:38:40.889574+08:00 > yansongda.artful.DEBUG > [AddPayloadBodyPlugin] 插件开始装载 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":null,"method":null,"headers":null,"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates"},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}}}

2024-03-13T21:38:40.891655+08:00 > yansongda.artful.INFO > [AddPayloadBodyPlugin] 插件装载完毕 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":null,"method":null,"headers":null,"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates","_body":""},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}}}

2024-03-13T21:38:40.891868+08:00 > yansongda.artful.DEBUG > [Wechat][V3][AddPayloadSignaturePlugin] 插件开始装载 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":null,"method":null,"headers":null,"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates","_body":""},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}}}

2024-03-13T21:38:40.911020+08:00 > yansongda.artful.INFO > [Wechat][V3][AddPayloadSignaturePlugin] 插件装载完毕 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":null,"method":null,"headers":null,"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates","_body":"","_authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}}}

2024-03-13T21:38:40.911536+08:00 > yansongda.artful.DEBUG > [Wechat][AddRadarPlugin] 插件开始装载 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":null,"method":null,"headers":null,"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates","_body":"","_authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}}}

2024-03-13T21:38:40.915869+08:00 > yansongda.artful.INFO > [Wechat][AddRadarPlugin] 插件装载完毕 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":"https://api.mch.weixin.qq.com/v3/certificates","method":"GET","headers":{"Host":["api.mch.weixin.qq.com"],"Accept":["application/json, text/plain, application/x-gzip"],"User-Agent":["yansongda/pay-v3"],"Content-Type":["application/json; charset=utf-8"],"Authorization":["WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""]},"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates","_body":"","_authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}}}

2024-03-13T21:38:40.918344+08:00 > yansongda.artful.INFO > [Artful] 准备请求第三方 API {"radar":{"url":"https://api.mch.weixin.qq.com/v3/certificates","method":"GET","headers":{"Host":["api.mch.weixin.qq.com"],"Accept":["application/json, text/plain, application/x-gzip"],"User-Agent":["yansongda/pay-v3"],"Content-Type":["application/json; charset=utf-8"],"Authorization":["WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""]},"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates","_body":"","_authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":null,"destination_origin":{"status":null,"headers":null,"body":""}}

2024-03-13T21:38:41.159264+08:00 > yansongda.artful.INFO > [Artful] 请求第三方 API 成功 {"rocket":{"radar":{"url":"https://api.mch.weixin.qq.com/v3/certificates","method":"GET","headers":{"Host":["api.mch.weixin.qq.com"],"Accept":["application/json, text/plain, application/x-gzip"],"User-Agent":["yansongda/pay-v3"],"Content-Type":["application/json; charset=utf-8"],"Authorization":["WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""]},"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates","_body":"","_authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":{"GuzzleHttp\Psr7\Response":[]},"destination_origin":{"status":200,"headers":{"Server":["nginx"],"Date":["Wed, 13 Mar 2024 13:38:41 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["2268"],"Connection":["keep-alive"],"Keep-Alive":["timeout=8"],"Cache-Control":["no-cache, must-revalidate"],"X-Content-Type-Options":["nosniff"],"Request-ID":["08E1D8C6AF0610DB0118998EA85C20F60428C1EE05-0"],"Content-Language":["zh-CN"],"Wechatpay-Nonce":["b7cba04f9457a4566e487a04e19c74f5"],"Wechatpay-Signature":["rv7IbpM8KKVtL29USK6/bq+bLKxxJnpFLL/3j4Pzmn9Gu/XPMPaoEwMZtJrd6Wa2WnKTwNvfKanACZoh38KABwmGOOV7hHLuOGDzm85OEb3S8GejnHpXkOnlgRLRM9yNY+sf9PNMMgT73+HC1d6ua5gPB7V0O11Ul6TKjdjiGKlsPYTCax4MrFxUL5nlWonRRxW9prJVpeXZtgUTZf5p0Nv3k9sWajunKQ+xrqLyuQZqIdpFJbv74CmK/J5v9Zm54+0jnxQMVPo5vR1Ru1KYqNpo8RTVxmbp+gAbqW9uv3dK/lWMwRy/9fW1eiv9O0jA6+XyNGJNwcg4RnK/18bmWQ=="],"Wechatpay-Timestamp":["1710337121"],"Wechatpay-Serial":["3FEE40B00F1854E9084B417E6FA7079B18DB28C9"],"Wechatpay-Signature-Type":["WECHATPAY2-SHA256-RSA2048"]},"body":"{\"data\":[{\"effective_time\":\"2024-03-12T15:37:08+08:00\",\"encrypt_certificate\":{\"algorithm\":\"AEAD_AES_256_GCM\",\"associated_data\":\"certificate\",\"ciphertext\":\"gn8R86RuLZUP8p1X/BwyxeaLQiRvxctT6XWpb/oAB0baso/stQklzUQfPksRRJgDt6bO2CxF0kDkT/m45AnRzg0flDm0ZNnUAEWRFkxmcwPtR8OFkN53XT+gU4yVW2i3cuHgwaJFns8Za/V0S9gDePngR/dIPJYyswamr8Ceh1uVRDHHFBBokqk+xxsrFFgGU4jp30e2ZJ/L33K/zAadeSwCizasiVMQhPZSBdI/VEHvsEqs5o6gPJ+qSoBWpyY+bkCpVRFt0ZgeII22niNLCMl/fJLju/LIjtv1yjNuNnQpPs9916KOCWchALguMFienAQSEi/GR5pnS4lBhlBdOXSgtf6fNkWbSI97c+r7YHAbI3G6FeXHaAswI5iay+lxVlbk2ZZ8D0/ZmoyBVTtk27uFFbSl/48PrArFOdwHLV3ZHuY6PSUeCTgnxkUGaXw3lHNZ04lXKOQT+c1kBFdhjWDwdY/YSou6fw6tCVdSR1E9XiqgGVBsylnXpVutGJek7YFCxGBZ3W34lg5UY6exJb9hq0rLVLAXo/jQt0aS4fA2yZv/hVjE/nJSC1prwaKGMl/VqPabNIPAX1hcsuaGKB8zpHNcm+gnNt1n+lGEIxIsRunvl4EdaEbscCQ69d00bZ+raFTaXnGEANUr6pl00bk1D//XhTXZs+5CyZ6lnukvjHhfma7OqXT3H/ToXpMf5UsAMMc9OPIlSctPZ2ufJO/tmsu5ZhRwyW0QR6NNmiSixfhL3ssxgcuHzC+ouzAwBgmPbN9IxgEHyxXshTsOo3ElUzLu5eBVjLShdZoADLpzupiykFpwdypCr8/6pjZ+tsV+mv3In/2A0u+diIZjxD1w8Y68pSz6TUjBTUufflQA1Nh+OLmp5zPJL0iKbiLd0+OtPrdkSNx1lFwmLJSdMRU4QdBwETvlJQVp7fE/yXmmJY9mlE8YcFB/aZ3OUr6vedxMn3e4wQx9Zu9nSX9jBnIkWxP/Lgwc0xZjSOlWcHUU1iyrnvegTZxwbBn3OJXxfhQ3SOD25dUPDOGP5ZVokMMYf34FWwjOa3k+rwiF2kxwjk8rSFtmvTt4lXBaseXHzrF4YJ+DVop2+NLhQOvxJKOyct64qmc7eUxrDsaBkBakmSMiSqHTGvnoSGuTg9xLOvFCM8Q6hk6ye536adROHmz4cvAaunv1H76LQ0jQvKpA/fXCkXaQApugpKC5khZDm5lEltpuTimiV8J9ADIcomoi28XJLUlHjxHC8754GvkqMxq7zCXPcYaXW2cmptHEj017R+PMjFihSZ92IaDCvRHIswvUN7fa9ZuKQwQ7QvkLV4OkEuLX6CL4gC\",\"nonce\":\"e0219297f36c\"},\"expire_time\":\"2029-03-11T15:37:08+08:00\",\"serial_no\":\"3FEE40B00F1854E9084B417E6FA7079B18DB28C9\"}]}"}}}

2024-03-13T21:38:41.164367+08:00 > yansongda.artful.DEBUG > [ParserPlugin] 插件开始装载 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":"https://api.mch.weixin.qq.com/v3/certificates","method":"GET","headers":{"Host":["api.mch.weixin.qq.com"],"Accept":["application/json, text/plain, application/x-gzip"],"User-Agent":["yansongda/pay-v3"],"Content-Type":["application/json; charset=utf-8"],"Authorization":["WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""]},"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates","_body":"","_authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":{},"destination_origin":{"status":200,"headers":{"Server":["nginx"],"Date":["Wed, 13 Mar 2024 13:38:41 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["2268"],"Connection":["keep-alive"],"Keep-Alive":["timeout=8"],"Cache-Control":["no-cache, must-revalidate"],"X-Content-Type-Options":["nosniff"],"Request-ID":["08E1D8C6AF0610DB0118998EA85C20F60428C1EE05-0"],"Content-Language":["zh-CN"],"Wechatpay-Nonce":["b7cba04f9457a4566e487a04e19c74f5"],"Wechatpay-Signature":["rv7IbpM8KKVtL29USK6/bq+bLKxxJnpFLL/3j4Pzmn9Gu/XPMPaoEwMZtJrd6Wa2WnKTwNvfKanACZoh38KABwmGOOV7hHLuOGDzm85OEb3S8GejnHpXkOnlgRLRM9yNY+sf9PNMMgT73+HC1d6ua5gPB7V0O11Ul6TKjdjiGKlsPYTCax4MrFxUL5nlWonRRxW9prJVpeXZtgUTZf5p0Nv3k9sWajunKQ+xrqLyuQZqIdpFJbv74CmK/J5v9Zm54+0jnxQMVPo5vR1Ru1KYqNpo8RTVxmbp+gAbqW9uv3dK/lWMwRy/9fW1eiv9O0jA6+XyNGJNwcg4RnK/18bmWQ=="],"Wechatpay-Timestamp":["1710337121"],"Wechatpay-Serial":["3FEE40B00F1854E9084B417E6FA7079B18DB28C9"],"Wechatpay-Signature-Type":["WECHATPAY2-SHA256-RSA2048"]},"body":"{\"data\":[{\"effective_time\":\"2024-03-12T15:37:08+08:00\",\"encrypt_certificate\":{\"algorithm\":\"AEAD_AES_256_GCM\",\"associated_data\":\"certificate\",\"ciphertext\":\"gn8R86RuLZUP8p1X/BwyxeaLQiRvxctT6XWpb/oAB0baso/stQklzUQfPksRRJgDt6bO2CxF0kDkT/m45AnRzg0flDm0ZNnUAEWRFkxmcwPtR8OFkN53XT+gU4yVW2i3cuHgwaJFns8Za/V0S9gDePngR/dIPJYyswamr8Ceh1uVRDHHFBBokqk+xxsrFFgGU4jp30e2ZJ/L33K/zAadeSwCizasiVMQhPZSBdI/VEHvsEqs5o6gPJ+qSoBWpyY+bkCpVRFt0ZgeII22niNLCMl/fJLju/LIjtv1yjNuNnQpPs9916KOCWchALguMFienAQSEi/GR5pnS4lBhlBdOXSgtf6fNkWbSI97c+r7YHAbI3G6FeXHaAswI5iay+lxVlbk2ZZ8D0/ZmoyBVTtk27uFFbSl/48PrArFOdwHLV3ZHuY6PSUeCTgnxkUGaXw3lHNZ04lXKOQT+c1kBFdhjWDwdY/YSou6fw6tCVdSR1E9XiqgGVBsylnXpVutGJek7YFCxGBZ3W34lg5UY6exJb9hq0rLVLAXo/jQt0aS4fA2yZv/hVjE/nJSC1prwaKGMl/VqPabNIPAX1hcsuaGKB8zpHNcm+gnNt1n+lGEIxIsRunvl4EdaEbscCQ69d00bZ+raFTaXnGEANUr6pl00bk1D//XhTXZs+5CyZ6lnukvjHhfma7OqXT3H/ToXpMf5UsAMMc9OPIlSctPZ2ufJO/tmsu5ZhRwyW0QR6NNmiSixfhL3ssxgcuHzC+ouzAwBgmPbN9IxgEHyxXshTsOo3ElUzLu5eBVjLShdZoADLpzupiykFpwdypCr8/6pjZ+tsV+mv3In/2A0u+diIZjxD1w8Y68pSz6TUjBTUufflQA1Nh+OLmp5zPJL0iKbiLd0+OtPrdkSNx1lFwmLJSdMRU4QdBwETvlJQVp7fE/yXmmJY9mlE8YcFB/aZ3OUr6vedxMn3e4wQx9Zu9nSX9jBnIkWxP/Lgwc0xZjSOlWcHUU1iyrnvegTZxwbBn3OJXxfhQ3SOD25dUPDOGP5ZVokMMYf34FWwjOa3k+rwiF2kxwjk8rSFtmvTt4lXBaseXHzrF4YJ+DVop2+NLhQOvxJKOyct64qmc7eUxrDsaBkBakmSMiSqHTGvnoSGuTg9xLOvFCM8Q6hk6ye536adROHmz4cvAaunv1H76LQ0jQvKpA/fXCkXaQApugpKC5khZDm5lEltpuTimiV8J9ADIcomoi28XJLUlHjxHC8754GvkqMxq7zCXPcYaXW2cmptHEj017R+PMjFihSZ92IaDCvRHIswvUN7fa9ZuKQwQ7QvkLV4OkEuLX6CL4gC\",\"nonce\":\"e0219297f36c\"},\"expire_time\":\"2029-03-11T15:37:08+08:00\",\"serial_no\":\"3FEE40B00F1854E9084B417E6FA7079B18DB28C9\"}]}"}}}}

2024-03-13T21:38:41.165978+08:00 > yansongda.artful.DEBUG > [ParserPlugin] 插件装载完毕 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":"https://api.mch.weixin.qq.com/v3/certificates","method":"GET","headers":{"Host":["api.mch.weixin.qq.com"],"Accept":["application/json, text/plain, application/x-gzip"],"User-Agent":["yansongda/pay-v3"],"Content-Type":["application/json; charset=utf-8"],"Authorization":["WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""]},"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates","_body":"","_authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":{"data":[{"effective_time":"2024-03-12T15:37:08+08:00","encrypt_certificate":{"algorithm":"AEAD_AES_256_GCM","associated_data":"certificate","ciphertext":"gn8R86RuLZUP8p1X/BwyxeaLQiRvxctT6XWpb/oAB0baso/stQklzUQfPksRRJgDt6bO2CxF0kDkT/m45AnRzg0flDm0ZNnUAEWRFkxmcwPtR8OFkN53XT+gU4yVW2i3cuHgwaJFns8Za/V0S9gDePngR/dIPJYyswamr8Ceh1uVRDHHFBBokqk+xxsrFFgGU4jp30e2ZJ/L33K/zAadeSwCizasiVMQhPZSBdI/VEHvsEqs5o6gPJ+qSoBWpyY+bkCpVRFt0ZgeII22niNLCMl/fJLju/LIjtv1yjNuNnQpPs9916KOCWchALguMFienAQSEi/GR5pnS4lBhlBdOXSgtf6fNkWbSI97c+r7YHAbI3G6FeXHaAswI5iay+lxVlbk2ZZ8D0/ZmoyBVTtk27uFFbSl/48PrArFOdwHLV3ZHuY6PSUeCTgnxkUGaXw3lHNZ04lXKOQT+c1kBFdhjWDwdY/YSou6fw6tCVdSR1E9XiqgGVBsylnXpVutGJek7YFCxGBZ3W34lg5UY6exJb9hq0rLVLAXo/jQt0aS4fA2yZv/hVjE/nJSC1prwaKGMl/VqPabNIPAX1hcsuaGKB8zpHNcm+gnNt1n+lGEIxIsRunvl4EdaEbscCQ69d00bZ+raFTaXnGEANUr6pl00bk1D//XhTXZs+5CyZ6lnukvjHhfma7OqXT3H/ToXpMf5UsAMMc9OPIlSctPZ2ufJO/tmsu5ZhRwyW0QR6NNmiSixfhL3ssxgcuHzC+ouzAwBgmPbN9IxgEHyxXshTsOo3ElUzLu5eBVjLShdZoADLpzupiykFpwdypCr8/6pjZ+tsV+mv3In/2A0u+diIZjxD1w8Y68pSz6TUjBTUufflQA1Nh+OLmp5zPJL0iKbiLd0+OtPrdkSNx1lFwmLJSdMRU4QdBwETvlJQVp7fE/yXmmJY9mlE8YcFB/aZ3OUr6vedxMn3e4wQx9Zu9nSX9jBnIkWxP/Lgwc0xZjSOlWcHUU1iyrnvegTZxwbBn3OJXxfhQ3SOD25dUPDOGP5ZVokMMYf34FWwjOa3k+rwiF2kxwjk8rSFtmvTt4lXBaseXHzrF4YJ+DVop2+NLhQOvxJKOyct64qmc7eUxrDsaBkBakmSMiSqHTGvnoSGuTg9xLOvFCM8Q6hk6ye536adROHmz4cvAaunv1H76LQ0jQvKpA/fXCkXaQApugpKC5khZDm5lEltpuTimiV8J9ADIcomoi28XJLUlHjxHC8754GvkqMxq7zCXPcYaXW2cmptHEj017R+PMjFihSZ92IaDCvRHIswvUN7fa9ZuKQwQ7QvkLV4OkEuLX6CL4gC","nonce":"e0219297f36c"},"expire_time":"2029-03-11T15:37:08+08:00","serial_no":"3FEE40B00F1854E9084B417E6FA7079B18DB28C9"}]},"destination_origin":{"status":200,"headers":{"Server":["nginx"],"Date":["Wed, 13 Mar 2024 13:38:41 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["2268"],"Connection":["keep-alive"],"Keep-Alive":["timeout=8"],"Cache-Control":["no-cache, must-revalidate"],"X-Content-Type-Options":["nosniff"],"Request-ID":["08E1D8C6AF0610DB0118998EA85C20F60428C1EE05-0"],"Content-Language":["zh-CN"],"Wechatpay-Nonce":["b7cba04f9457a4566e487a04e19c74f5"],"Wechatpay-Signature":["rv7IbpM8KKVtL29USK6/bq+bLKxxJnpFLL/3j4Pzmn9Gu/XPMPaoEwMZtJrd6Wa2WnKTwNvfKanACZoh38KABwmGOOV7hHLuOGDzm85OEb3S8GejnHpXkOnlgRLRM9yNY+sf9PNMMgT73+HC1d6ua5gPB7V0O11Ul6TKjdjiGKlsPYTCax4MrFxUL5nlWonRRxW9prJVpeXZtgUTZf5p0Nv3k9sWajunKQ+xrqLyuQZqIdpFJbv74CmK/J5v9Zm54+0jnxQMVPo5vR1Ru1KYqNpo8RTVxmbp+gAbqW9uv3dK/lWMwRy/9fW1eiv9O0jA6+XyNGJNwcg4RnK/18bmWQ=="],"Wechatpay-Timestamp":["1710337121"],"Wechatpay-Serial":["3FEE40B00F1854E9084B417E6FA7079B18DB28C9"],"Wechatpay-Signature-Type":["WECHATPAY2-SHA256-RSA2048"]},"body":"{\"data\":[{\"effective_time\":\"2024-03-12T15:37:08+08:00\",\"encrypt_certificate\":{\"algorithm\":\"AEAD_AES_256_GCM\",\"associated_data\":\"certificate\",\"ciphertext\":\"gn8R86RuLZUP8p1X/BwyxeaLQiRvxctT6XWpb/oAB0baso/stQklzUQfPksRRJgDt6bO2CxF0kDkT/m45AnRzg0flDm0ZNnUAEWRFkxmcwPtR8OFkN53XT+gU4yVW2i3cuHgwaJFns8Za/V0S9gDePngR/dIPJYyswamr8Ceh1uVRDHHFBBokqk+xxsrFFgGU4jp30e2ZJ/L33K/zAadeSwCizasiVMQhPZSBdI/VEHvsEqs5o6gPJ+qSoBWpyY+bkCpVRFt0ZgeII22niNLCMl/fJLju/LIjtv1yjNuNnQpPs9916KOCWchALguMFienAQSEi/GR5pnS4lBhlBdOXSgtf6fNkWbSI97c+r7YHAbI3G6FeXHaAswI5iay+lxVlbk2ZZ8D0/ZmoyBVTtk27uFFbSl/48PrArFOdwHLV3ZHuY6PSUeCTgnxkUGaXw3lHNZ04lXKOQT+c1kBFdhjWDwdY/YSou6fw6tCVdSR1E9XiqgGVBsylnXpVutGJek7YFCxGBZ3W34lg5UY6exJb9hq0rLVLAXo/jQt0aS4fA2yZv/hVjE/nJSC1prwaKGMl/VqPabNIPAX1hcsuaGKB8zpHNcm+gnNt1n+lGEIxIsRunvl4EdaEbscCQ69d00bZ+raFTaXnGEANUr6pl00bk1D//XhTXZs+5CyZ6lnukvjHhfma7OqXT3H/ToXpMf5UsAMMc9OPIlSctPZ2ufJO/tmsu5ZhRwyW0QR6NNmiSixfhL3ssxgcuHzC+ouzAwBgmPbN9IxgEHyxXshTsOo3ElUzLu5eBVjLShdZoADLpzupiykFpwdypCr8/6pjZ+tsV+mv3In/2A0u+diIZjxD1w8Y68pSz6TUjBTUufflQA1Nh+OLmp5zPJL0iKbiLd0+OtPrdkSNx1lFwmLJSdMRU4QdBwETvlJQVp7fE/yXmmJY9mlE8YcFB/aZ3OUr6vedxMn3e4wQx9Zu9nSX9jBnIkWxP/Lgwc0xZjSOlWcHUU1iyrnvegTZxwbBn3OJXxfhQ3SOD25dUPDOGP5ZVokMMYf34FWwjOa3k+rwiF2kxwjk8rSFtmvTt4lXBaseXHzrF4YJ+DVop2+NLhQOvxJKOyct64qmc7eUxrDsaBkBakmSMiSqHTGvnoSGuTg9xLOvFCM8Q6hk6ye536adROHmz4cvAaunv1H76LQ0jQvKpA/fXCkXaQApugpKC5khZDm5lEltpuTimiV8J9ADIcomoi28XJLUlHjxHC8754GvkqMxq7zCXPcYaXW2cmptHEj017R+PMjFihSZ92IaDCvRHIswvUN7fa9ZuKQwQ7QvkLV4OkEuLX6CL4gC\",\"nonce\":\"e0219297f36c\"},\"expire_time\":\"2029-03-11T15:37:08+08:00\",\"serial_no\":\"3FEE40B00F1854E9084B417E6FA7079B18DB28C9\"}]}"}}}}

2024-03-13T21:38:41.166431+08:00 > yansongda.artful.DEBUG > [Wechat][ResponsePlugin] 插件开始装载 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":"https://api.mch.weixin.qq.com/v3/certificates","method":"GET","headers":{"Host":["api.mch.weixin.qq.com"],"Accept":["application/json, text/plain, application/x-gzip"],"User-Agent":["yansongda/pay-v3"],"Content-Type":["application/json; charset=utf-8"],"Authorization":["WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""]},"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates","_body":"","_authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":{"data":[{"effective_time":"2024-03-12T15:37:08+08:00","encrypt_certificate":{"algorithm":"AEAD_AES_256_GCM","associated_data":"certificate","ciphertext":"gn8R86RuLZUP8p1X/BwyxeaLQiRvxctT6XWpb/oAB0baso/stQklzUQfPksRRJgDt6bO2CxF0kDkT/m45AnRzg0flDm0ZNnUAEWRFkxmcwPtR8OFkN53XT+gU4yVW2i3cuHgwaJFns8Za/V0S9gDePngR/dIPJYyswamr8Ceh1uVRDHHFBBokqk+xxsrFFgGU4jp30e2ZJ/L33K/zAadeSwCizasiVMQhPZSBdI/VEHvsEqs5o6gPJ+qSoBWpyY+bkCpVRFt0ZgeII22niNLCMl/fJLju/LIjtv1yjNuNnQpPs9916KOCWchALguMFienAQSEi/GR5pnS4lBhlBdOXSgtf6fNkWbSI97c+r7YHAbI3G6FeXHaAswI5iay+lxVlbk2ZZ8D0/ZmoyBVTtk27uFFbSl/48PrArFOdwHLV3ZHuY6PSUeCTgnxkUGaXw3lHNZ04lXKOQT+c1kBFdhjWDwdY/YSou6fw6tCVdSR1E9XiqgGVBsylnXpVutGJek7YFCxGBZ3W34lg5UY6exJb9hq0rLVLAXo/jQt0aS4fA2yZv/hVjE/nJSC1prwaKGMl/VqPabNIPAX1hcsuaGKB8zpHNcm+gnNt1n+lGEIxIsRunvl4EdaEbscCQ69d00bZ+raFTaXnGEANUr6pl00bk1D//XhTXZs+5CyZ6lnukvjHhfma7OqXT3H/ToXpMf5UsAMMc9OPIlSctPZ2ufJO/tmsu5ZhRwyW0QR6NNmiSixfhL3ssxgcuHzC+ouzAwBgmPbN9IxgEHyxXshTsOo3ElUzLu5eBVjLShdZoADLpzupiykFpwdypCr8/6pjZ+tsV+mv3In/2A0u+diIZjxD1w8Y68pSz6TUjBTUufflQA1Nh+OLmp5zPJL0iKbiLd0+OtPrdkSNx1lFwmLJSdMRU4QdBwETvlJQVp7fE/yXmmJY9mlE8YcFB/aZ3OUr6vedxMn3e4wQx9Zu9nSX9jBnIkWxP/Lgwc0xZjSOlWcHUU1iyrnvegTZxwbBn3OJXxfhQ3SOD25dUPDOGP5ZVokMMYf34FWwjOa3k+rwiF2kxwjk8rSFtmvTt4lXBaseXHzrF4YJ+DVop2+NLhQOvxJKOyct64qmc7eUxrDsaBkBakmSMiSqHTGvnoSGuTg9xLOvFCM8Q6hk6ye536adROHmz4cvAaunv1H76LQ0jQvKpA/fXCkXaQApugpKC5khZDm5lEltpuTimiV8J9ADIcomoi28XJLUlHjxHC8754GvkqMxq7zCXPcYaXW2cmptHEj017R+PMjFihSZ92IaDCvRHIswvUN7fa9ZuKQwQ7QvkLV4OkEuLX6CL4gC","nonce":"e0219297f36c"},"expire_time":"2029-03-11T15:37:08+08:00","serial_no":"3FEE40B00F1854E9084B417E6FA7079B18DB28C9"}]},"destination_origin":{"status":200,"headers":{"Server":["nginx"],"Date":["Wed, 13 Mar 2024 13:38:41 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["2268"],"Connection":["keep-alive"],"Keep-Alive":["timeout=8"],"Cache-Control":["no-cache, must-revalidate"],"X-Content-Type-Options":["nosniff"],"Request-ID":["08E1D8C6AF0610DB0118998EA85C20F60428C1EE05-0"],"Content-Language":["zh-CN"],"Wechatpay-Nonce":["b7cba04f9457a4566e487a04e19c74f5"],"Wechatpay-Signature":["rv7IbpM8KKVtL29USK6/bq+bLKxxJnpFLL/3j4Pzmn9Gu/XPMPaoEwMZtJrd6Wa2WnKTwNvfKanACZoh38KABwmGOOV7hHLuOGDzm85OEb3S8GejnHpXkOnlgRLRM9yNY+sf9PNMMgT73+HC1d6ua5gPB7V0O11Ul6TKjdjiGKlsPYTCax4MrFxUL5nlWonRRxW9prJVpeXZtgUTZf5p0Nv3k9sWajunKQ+xrqLyuQZqIdpFJbv74CmK/J5v9Zm54+0jnxQMVPo5vR1Ru1KYqNpo8RTVxmbp+gAbqW9uv3dK/lWMwRy/9fW1eiv9O0jA6+XyNGJNwcg4RnK/18bmWQ=="],"Wechatpay-Timestamp":["1710337121"],"Wechatpay-Serial":["3FEE40B00F1854E9084B417E6FA7079B18DB28C9"],"Wechatpay-Signature-Type":["WECHATPAY2-SHA256-RSA2048"]},"body":"{\"data\":[{\"effective_time\":\"2024-03-12T15:37:08+08:00\",\"encrypt_certificate\":{\"algorithm\":\"AEAD_AES_256_GCM\",\"associated_data\":\"certificate\",\"ciphertext\":\"gn8R86RuLZUP8p1X/BwyxeaLQiRvxctT6XWpb/oAB0baso/stQklzUQfPksRRJgDt6bO2CxF0kDkT/m45AnRzg0flDm0ZNnUAEWRFkxmcwPtR8OFkN53XT+gU4yVW2i3cuHgwaJFns8Za/V0S9gDePngR/dIPJYyswamr8Ceh1uVRDHHFBBokqk+xxsrFFgGU4jp30e2ZJ/L33K/zAadeSwCizasiVMQhPZSBdI/VEHvsEqs5o6gPJ+qSoBWpyY+bkCpVRFt0ZgeII22niNLCMl/fJLju/LIjtv1yjNuNnQpPs9916KOCWchALguMFienAQSEi/GR5pnS4lBhlBdOXSgtf6fNkWbSI97c+r7YHAbI3G6FeXHaAswI5iay+lxVlbk2ZZ8D0/ZmoyBVTtk27uFFbSl/48PrArFOdwHLV3ZHuY6PSUeCTgnxkUGaXw3lHNZ04lXKOQT+c1kBFdhjWDwdY/YSou6fw6tCVdSR1E9XiqgGVBsylnXpVutGJek7YFCxGBZ3W34lg5UY6exJb9hq0rLVLAXo/jQt0aS4fA2yZv/hVjE/nJSC1prwaKGMl/VqPabNIPAX1hcsuaGKB8zpHNcm+gnNt1n+lGEIxIsRunvl4EdaEbscCQ69d00bZ+raFTaXnGEANUr6pl00bk1D//XhTXZs+5CyZ6lnukvjHhfma7OqXT3H/ToXpMf5UsAMMc9OPIlSctPZ2ufJO/tmsu5ZhRwyW0QR6NNmiSixfhL3ssxgcuHzC+ouzAwBgmPbN9IxgEHyxXshTsOo3ElUzLu5eBVjLShdZoADLpzupiykFpwdypCr8/6pjZ+tsV+mv3In/2A0u+diIZjxD1w8Y68pSz6TUjBTUufflQA1Nh+OLmp5zPJL0iKbiLd0+OtPrdkSNx1lFwmLJSdMRU4QdBwETvlJQVp7fE/yXmmJY9mlE8YcFB/aZ3OUr6vedxMn3e4wQx9Zu9nSX9jBnIkWxP/Lgwc0xZjSOlWcHUU1iyrnvegTZxwbBn3OJXxfhQ3SOD25dUPDOGP5ZVokMMYf34FWwjOa3k+rwiF2kxwjk8rSFtmvTt4lXBaseXHzrF4YJ+DVop2+NLhQOvxJKOyct64qmc7eUxrDsaBkBakmSMiSqHTGvnoSGuTg9xLOvFCM8Q6hk6ye536adROHmz4cvAaunv1H76LQ0jQvKpA/fXCkXaQApugpKC5khZDm5lEltpuTimiV8J9ADIcomoi28XJLUlHjxHC8754GvkqMxq7zCXPcYaXW2cmptHEj017R+PMjFihSZ92IaDCvRHIswvUN7fa9ZuKQwQ7QvkLV4OkEuLX6CL4gC\",\"nonce\":\"e0219297f36c\"},\"expire_time\":\"2029-03-11T15:37:08+08:00\",\"serial_no\":\"3FEE40B00F1854E9084B417E6FA7079B18DB28C9\"}]}"}}}}

2024-03-13T21:38:41.166851+08:00 > yansongda.artful.INFO > [Wechat][ResponsePlugin] 插件装载完毕 {"rocket":{"Yansongda\Artful\Rocket":{"radar":{"url":"https://api.mch.weixin.qq.com/v3/certificates","method":"GET","headers":{"Host":["api.mch.weixin.qq.com"],"Accept":["application/json, text/plain, application/x-gzip"],"User-Agent":["yansongda/pay-v3"],"Content-Type":["application/json; charset=utf-8"],"Authorization":["WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""]},"body":""},"params":[],"payload":{"_method":"GET","_url":"v3/certificates","_body":"","_authorization":"WECHATPAY2-SHA256-RSA2048 mchid=\"商户号\",nonce_str=\"6FUrbYjk0lMcO2qO3rADuUdrNvRd59TM\",timestamp=\"1710337120\",serial_no=\"34DA57FE3690F18D81E98A8178FF24F0EC28C302\",signature=\"Jt1/45WNPQs6r8O9SNtcMO1/3759pZGlX+Tf7okdAxK1D+eQEO/Rx+zolA9L68b6N5uW7RTKH3CptSy6i4vVhu5ilzjUR5ItxnmjBdi+e9zc7endyDfppODuqBQa1K0wGo48OGcEWle/NbwQocNDuZ98yLvImzCGlQLi1yJ0vZcfa0bq7hBSl3tDEWeFR+qOGP062DSMuqvagdmmEXsOG1Zix6CXI2yca3vyqj20wpx8zpP7rzV1Op+v0WF+x6hGkHIZ+nqhfbQdUt3dm3mKAN5tlim3ARGl5fMNBv6DlFOZylBhVZQ==\""},"packer":"Yansongda\Artful\Contract\PackerInterface","direction":"Yansongda\Artful\Contract\DirectionInterface","destination":{"data":[{"effective_time":"2024-03-12T15:37:08+08:00","encrypt_certificate":{"algorithm":"AEAD_AES_256_GCM","associated_data":"certificate","ciphertext":"gn8R86RuLZUP8p1X/BwyxeaLQiRvxctT6XWpb/oAB0baso/stQklzUQfPksRRJgDt6bO2CxF0kDkT/m45AnRzg0flDm0ZNnUAEWRFkxmcwPtR8OFkN53XT+gU4yVW2i3cuHgwaJFns8Za/V0S9gDePngR/dIPJYyswamr8Ceh1uVRDHHFBBokqk+xxsrFFgGU4jp30e2ZJ/L33K/zAadeSwCizasiVMQhPZSBdI/VEHvsEqs5o6gPJ+qSoBWpyY+bkCpVRFt0ZgeII22niNLCMl/fJLju/LIjtv1yjNuNnQpPs9916KOCWchALguMFienAQSEi/GR5pnS4lBhlBdOXSgtf6fNkWbSI97c+r7YHAbI3G6FeXHaAswI5iay+lxVlbk2ZZ8D0/ZmoyBVTtk27uFFbSl/48PrArFOdwHLV3ZHuY6PSUeCTgnxkUGaXw3lHNZ04lXKOQT+c1kBFdhjWDwdY/YSou6fw6tCVdSR1E9XiqgGVBsylnXpVutGJek7YFCxGBZ3W34lg5UY6exJb9hq0rLVLAXo/jQt0aS4fA2yZv/hVjE/nJSC1prwaKGMl/VqPabNIPAX1hcsuaGKB8zpHNcm+gnNt1n+lGEIxIsRunvl4EdaEbscCQ69d00bZ+raFTaXnGEANUr6pl00bk1D//XhTXZs+5CyZ6lnukvjHhfma7OqXT3H/ToXpMf5UsAMMc9OPIlSctPZ2ufJO/tmsu5ZhRwyW0QR6NNmiSixfhL3ssxgcuHzC+ouzAwBgmPbN9IxgEHyxXshTsOo3ElUzLu5eBVjLShdZoADLpzupiykFpwdypCr8/6pjZ+tsV+mv3In/2A0u+diIZjxD1w8Y68pSz6TUjBTUufflQA1Nh+OLmp5zPJL0iKbiLd0+OtPrdkSNx1lFwmLJSdMRU4QdBwETvlJQVp7fE/yXmmJY9mlE8YcFB/aZ3OUr6vedxMn3e4wQx9Zu9nSX9jBnIkWxP/Lgwc0xZjSOlWcHUU1iyrnvegTZxwbBn3OJXxfhQ3SOD25dUPDOGP5ZVokMMYf34FWwjOa3k+rwiF2kxwjk8rSFtmvTt4lXBaseXHzrF4YJ+DVop2+NLhQOvxJKOyct64qmc7eUxrDsaBkBakmSMiSqHTGvnoSGuTg9xLOvFCM8Q6hk6ye536adROHmz4cvAaunv1H76LQ0jQvKpA/fXCkXaQApugpKC5khZDm5lEltpuTimiV8J9ADIcomoi28XJLUlHjxHC8754GvkqMxq7zCXPcYaXW2cmptHEj017R+PMjFihSZ92IaDCvRHIswvUN7fa9ZuKQwQ7QvkLV4OkEuLX6CL4gC","nonce":"e0219297f36c"},"expire_time":"2029-03-11T15:37:08+08:00","serial_no":"3FEE40B00F1854E9084B417E6FA7079B18DB28C9"}]},"destination_origin":{"status":200,"headers":{"Server":["nginx"],"Date":["Wed, 13 Mar 2024 13:38:41 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["2268"],"Connection":["keep-alive"],"Keep-Alive":["timeout=8"],"Cache-Control":["no-cache, must-revalidate"],"X-Content-Type-Options":["nosniff"],"Request-ID":["08E1D8C6AF0610DB0118998EA85C20F60428C1EE05-0"],"Content-Language":["zh-CN"],"Wechatpay-Nonce":["b7cba04f9457a4566e487a04e19c74f5"],"Wechatpay-Signature":["rv7IbpM8KKVtL29USK6/bq+bLKxxJnpFLL/3j4Pzmn9Gu/XPMPaoEwMZtJrd6Wa2WnKTwNvfKanACZoh38KABwmGOOV7hHLuOGDzm85OEb3S8GejnHpXkOnlgRLRM9yNY+sf9PNMMgT73+HC1d6ua5gPB7V0O11Ul6TKjdjiGKlsPYTCax4MrFxUL5nlWonRRxW9prJVpeXZtgUTZf5p0Nv3k9sWajunKQ+xrqLyuQZqIdpFJbv74CmK/J5v9Zm54+0jnxQMVPo5vR1Ru1KYqNpo8RTVxmbp+gAbqW9uv3dK/lWMwRy/9fW1eiv9O0jA6+XyNGJNwcg4RnK/18bmWQ=="],"Wechatpay-Timestamp":["1710337121"],"Wechatpay-Serial":["3FEE40B00F1854E9084B417E6FA7079B18DB28C9"],"Wechatpay-Signature-Type":["WECHATPAY2-SHA256-RSA2048"]},"body":"{\"data\":[{\"effective_time\":\"2024-03-12T15:37:08+08:00\",\"encrypt_certificate\":{\"algorithm\":\"AEAD_AES_256_GCM\",\"associated_data\":\"certificate\",\"ciphertext\":\"gn8R86RuLZUP8p1X/BwyxeaLQiRvxctT6XWpb/oAB0baso/stQklzUQfPksRRJgDt6bO2CxF0kDkT/m45AnRzg0flDm0ZNnUAEWRFkxmcwPtR8OFkN53XT+gU4yVW2i3cuHgwaJFns8Za/V0S9gDePngR/dIPJYyswamr8Ceh1uVRDHHFBBokqk+xxsrFFgGU4jp30e2ZJ/L33K/zAadeSwCizasiVMQhPZSBdI/VEHvsEqs5o6gPJ+qSoBWpyY+bkCpVRFt0ZgeII22niNLCMl/fJLju/LIjtv1yjNuNnQpPs9916KOCWchALguMFienAQSEi/GR5pnS4lBhlBdOXSgtf6fNkWbSI97c+r7YHAbI3G6FeXHaAswI5iay+lxVlbk2ZZ8D0/ZmoyBVTtk27uFFbSl/48PrArFOdwHLV3ZHuY6PSUeCTgnxkUGaXw3lHNZ04lXKOQT+c1kBFdhjWDwdY/YSou6fw6tCVdSR1E9XiqgGVBsylnXpVutGJek7YFCxGBZ3W34lg5UY6exJb9hq0rLVLAXo/jQt0aS4fA2yZv/hVjE/nJSC1prwaKGMl/VqPabNIPAX1hcsuaGKB8zpHNcm+gnNt1n+lGEIxIsRunvl4EdaEbscCQ69d00bZ+raFTaXnGEANUr6pl00bk1D//XhTXZs+5CyZ6lnukvjHhfma7OqXT3H/ToXpMf5UsAMMc9OPIlSctPZ2ufJO/tmsu5ZhRwyW0QR6NNmiSixfhL3ssxgcuHzC+ouzAwBgmPbN9IxgEHyxXshTsOo3ElUzLu5eBVjLShdZoADLpzupiykFpwdypCr8/6pjZ+tsV+mv3In/2A0u+diIZjxD1w8Y68pSz6TUjBTUufflQA1Nh+OLmp5zPJL0iKbiLd0+OtPrdkSNx1lFwmLJSdMRU4QdBwETvlJQVp7fE/yXmmJY9mlE8YcFB/aZ3OUr6vedxMn3e4wQx9Zu9nSX9jBnIkWxP/Lgwc0xZjSOlWcHUU1iyrnvegTZxwbBn3OJXxfhQ3SOD25dUPDOGP5ZVokMMYf34FWwjOa3k+rwiF2kxwjk8rSFtmvTt4lXBaseXHzrF4YJ+DVop2+NLhQOvxJKOyct64qmc7eUxrDsaBkBakmSMiSqHTGvnoSGuTg9xLOvFCM8Q6hk6ye536adROHmz4cvAaunv1H76LQ0jQvKpA/fXCkXaQApugpKC5khZDm5lEltpuTimiV8J9ADIcomoi28XJLUlHjxHC8754GvkqMxq7zCXPcYaXW2cmptHEj017R+PMjFihSZ92IaDCvRHIswvUN7fa9ZuKQwQ7QvkLV4OkEuLX6CL4gC\",\"nonce\":\"e0219297f36c\"},\"expire_time\":\"2029-03-11T15:37:08+08:00\",\"serial_no\":\"3FEE40B00F1854E9084B417E6FA7079B18DB28C9\"}]}"}}}}

hanwenbo commented 8 months ago
image
yansongda commented 8 months ago

这个日志感觉不全?看日志流程,目前还在获取微信的公钥证书

yansongda commented 8 months ago

看看能否把 https://github.com/yansongda/pay/blob/master/src/Functions.php#L253 这一行给 catch 下,或者直接在 throw 前面 var_dump($message, $body)

yansongda commented 8 months ago

只要符合 psr 正常来说应该没啥问题才对

hanwenbo commented 8 months ago
image

兄弟 我好像找到原因了 但是我改不好

yansongda commented 8 months ago

啥意思?你在 https://github.com/yansongda/pay/blob/master/src/Provider/Wechat.php#L72 这个地方打印 $params['_request'] 打印不出来?

hanwenbo commented 8 months ago

看看能否把 https://github.com/yansongda/pay/blob/master/src/Functions.php#L253 这一行给 catch 下,或者直接在 throw 前面 var_dump($message, $body)

这一步我可以直接回复你 我测过多次

$body = (string) $message->getBody(); 出来是 "" 空字符

问题就在这个getBody 获得的steam 是空的

image
hanwenbo commented 8 months ago

啥意思?你在 https://github.com/yansongda/pay/blob/master/src/Provider/Wechat.php#L72 这个地方打印 $params['_request'] 打印不出来?

打印的出来 但是steam变了 对不上 本来steam有资源 传到_request里再打印就空了

yansongda commented 8 months ago

那得看看 easy-swoole 的实现方式了

hanwenbo commented 8 months ago

那得看看 easy-swoole 的实现方式了

目前经过我的多次测试 我认为不是easyswoole的问题 是clone 改变了数据 你看下面截图

image image image
hanwenbo commented 8 months ago

大哥 今天你先休息 我也去问问easyswoole作者 或许swoole里的steam有点特殊

hanwenbo commented 8 months ago

那得看看 easy-swoole 的实现方式了

你先处理点别的事情 我去问问他 今晚不行 得明天

hanwenbo commented 8 months ago

兄弟我解决了 Event::dispatch(new CallbackReceived('wechat', clone $request, $params, null)); 改为 Event::dispatch(new CallbackReceived('wechat', $request, $params, null)); 就可以

可能原因是steam 不能clone (如网络连接、文件句柄等)不能被正确复制,后续对克隆对象的操作可能会失败或者返回空值。

yansongda commented 8 months ago

这个得评估看看,修改暂时还不能合到 master 分支,怕有其它问题。

晚些时候我看看 easyswoole 的源码看看是咋实现的,毕竟目前没有其它同学报过这个问题

hanwenbo commented 8 months ago

这个得评估看看,修改暂时还不能合到 master 分支,怕有其它问题。

晚些时候我看看 easyswoole 的源码看看是咋实现的,毕竟目前没有其它同学报过这个问题

好的 文件就是这个:https://github.com/easy-swoole/http/blob/3.x/src/Message/Message.php

hanwenbo commented 8 months ago
public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection|Rocket
    {
        $request = $this->getCallbackParams($contents);

        $newRequest = clone $request;
        Event::dispatch(new CallbackReceived('wechat', $newRequest, $params, null));

        return $this->pay(
            [CallbackPlugin::class],
            ['_request' => $request, '_params' => $params]
        );
    }

你可以改成这样吗 这样的话我测试了 不存在问题 如果直接使用clone 不新定义一个新变量 会污染之前的$request

yansongda commented 8 months ago

这样可以,但我想找找根本原因,看看问题出现在哪儿,也学习下😄

hanwenbo commented 8 months ago

@yansongda 你来看组数据 或许咱俩就知道底层php里怎么运作的了


 var_dump(spl_object_id($request)); // 98  原request
var_dump(spl_object_id(clone $request)); // 537  虽然给了新的id 但是下文再clone 还是这个, 像是临时分配了个位置 但不使用 下次你再不给变量clone 还是这个临时的 给一个变量赋值 就不是临时了 
$newRequest = clone $request;
var_dump(memory_get_usage()); // 9879720
var_dump(spl_object_id($newRequest));  // 537
var_dump(memory_get_usage()); // 9879720
$a = clone $newRequest;
var_dump(spl_object_id($a));  // 553
var_dump(memory_get_usage()); // 9879976
var_dump(spl_object_id(clone $newRequest));  // 554
var_dump(memory_get_usage()); // 9879976
var_dump(spl_object_id(clone $newRequest));  // 你猜这个id会是多少 ? 答案:554 并没有真正复制
var_dump(memory_get_usage()); // 9879976  从内存大小可以看出 并没复制 因为内存没增加

spl_object_id 这个函数返回对象的唯一标识符。对象id在对象的生命周期内是唯一的。

上面的测试 我理解就是 赋值给新的变量 内存里会创建一个新的指针完全克隆 但如果不赋值新的名字 它就不会创建新的指针 也不会占用内存

yansongda commented 8 months ago

昨晚我大概看了下,直觉告诉我问题可能在 easyswoole 的 Request 类里面晚些时候我再仔细研究下对了,你可以试试用 guzzlehttp 的  request 对比试试,guzzle 的是没问题的,单测里应该有相关部分-------- 原始邮件 --------发件人: hanwenbo @.>日期: 2024年3月14日周四 11:46收件人: yansongda/pay @.>抄送: yansongda @.>, Mention @.>主 题: Re: [yansongda/pay] swoole下message吃数据 直接把steam变为空了 (Issue #946) @yansongda 你来看组数据 或许咱俩就知道底层php里怎么运作的了 var_dump(spl_object_id($request)); // 98 var_dump(spl_object_id(clone $request)); // 537 $newRequest = clone $request; var_dump(memory_get_usage()); // 9879720 var_dump(spl_object_id($newRequest)); // 537 var_dump(memory_get_usage()); // 9879720 $a = clone $newRequest; var_dump(spl_object_id($a)); // 553 var_dump(memory_get_usage()); // 9879976 var_dump(spl_object_id(clone $newRequest)); // 554 var_dump(memory_get_usage()); // 9879976 var_dump(spl_object_id(clone $newRequest)); // 你猜这个id会是多少 ? 答案:554 并没有真正复制 var_dump(memory_get_usage()); // 9879976 从内存大小可以看出 并没复制 因为内存没增加 spl_object_id 这个函数返回对象的唯一标识符。对象id在对象的生命周期内是唯一的。 上面的测试 我理解就是 赋值给新的变量 内存里会创建一个新的指针完全克隆 但如果不赋值新的名字 它就不会创建新的指针 也不会占用内存

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

hanwenbo commented 8 months ago

昨晚我大概看了下,直觉告诉我问题可能在 easyswoole 的 Request 类里面晚些时候我再仔细研究下对了,你可以试试用 guzzlehttp 的  request 对比试试,guzzle 的是没问题的,单测里应该有相关部分-------- 原始邮件 --------发件人: hanwenbo @.>日期: 2024年3月14日周四 11:46收件人: yansongda/pay @.>抄送: yansongda @.>, Mention @.>主 题: Re: [yansongda/pay] swoole下message吃数据 直接把steam变为空了 (Issue #946) @yansongda 你来看组数据 或许咱俩就知道底层php里怎么运作的了 var_dump(spl_object_id($request)); // 98 var_dump(spl_object_id(clone $request)); // 537 $newRequest = clone $request; var_dump(memory_get_usage()); // 9879720 var_dump(spl_object_id($newRequest)); // 537 var_dump(memory_get_usage()); // 9879720 $a = clone $newRequest; var_dump(spl_object_id($a)); // 553 var_dump(memory_get_usage()); // 9879976 var_dump(spl_object_id(clone $newRequest)); // 554 var_dump(memory_get_usage()); // 9879976 var_dump(spl_object_id(clone $newRequest)); // 你猜这个id会是多少 ? 答案:554 并没有真正复制 var_dump(memory_get_usage()); // 9879976 从内存大小可以看出 并没复制 因为内存没增加 spl_object_id 这个函数返回对象的唯一标识符。对象id在对象的生命周期内是唯一的。 上面的测试 我理解就是 赋值给新的变量 内存里会创建一个新的指针完全克隆 但如果不赋值新的名字 它就不会创建新的指针 也不会占用内存 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

行 等晚一些我也试试其他框架 php-fpm的下是什么样

yansongda commented 8 months ago

我猜大概率是 https://github.com/easy-swoole/http/blob/3.x/src/Request.php#L163 这一行导致的,你方便的话可以测试看帮忙验证下。

目前不知道 easyswoole 官方是怎么考虑的做了这行改动。

$newRequest = clone $request; 这个改动可以是因为把 clone $request 的作用域改到 callback() 函数里了,所以 $request 的生命周期就变长了,_destruct 就延后了,进而 body 的 stream 就不会关闭,后面就能正常获取到

yansongda commented 8 months ago

easyswoole 这个项目还在维护么?如果没维护的话,我这边不打算兼容了

hanwenbo commented 3 months ago

@yansongda 在维护 还有挺多用户正在使用 大概几百个吧

hanwenbo commented 3 months ago

我猜大概率是 https://github.com/easy-swoole/http/blob/3.x/src/Request.php#L163 这一行导致的,你方便的话可以测试看帮忙验证下。

目前不知道 easyswoole 官方是怎么考虑的做了这行改动。

$newRequest = clone $request; 这个改动可以是因为把 clone $request 的作用域改到 callback() 函数里了,所以 $request 的生命周期就变长了,_destruct 就延后了,进而 body 的 stream 就不会关闭,后面就能正常获取到

这个clone 很深奥 我没用过 只是在你项目里看到过 生命周期这里没有研究