public function sendData($data)
{
$url = $this->getRequestUrl($data);
$body = $this->getRequestBody();
$response = $this->httpClient->post($url)->setBody($body, 'application/x-www-form-urlencoded')->send()->getBody();
$response = $this->decode($response);
return $response;
}
/** * Send the request with specified data * * @param mixed $data The data to send * * @return AopTradePayResponse|AopTradeQueryResponse * @throws InvalidRequestException */ public function sendData($data) { $data = parent::sendData($data); $this->response = new AopTradePayResponse($this, $data); if ($this->response->isWaitPay() && $this->polling) { $this->polling(); } return $this->response; }