$rocket]); $destination = $rocket->getDestination(); $payload = $rocket->getPayload(); $resultKey = str_replace('.', '_', $payload->get('method')).'_response'; if (should_do_http_request($rocket->getDirection()) && $destination instanceof Collection) { $sign = $destination->get('sign', ''); $response = $destination->get($resultKey, $destination->all()); if (empty($sign) && '10000' !== ($response['code'] ?? 'null')) { throw new InvalidResponseException(Exception::RESPONSE_BUSINESS_CODE_WRONG, '支付宝网关响应异常: '.($response['sub_msg'] ?? $response['msg'] ?? '未知错误,请查看支付宝原始响应'), $rocket->getDestination()); } $rocket->setDestination(new Collection(array_merge( ['_sign' => $sign], $response ))); } Logger::info('[Alipay][ResponsePlugin] 插件装载完毕', ['rocket' => $rocket]); return $rocket; } }