Send the request with specified data

@param  mixed $data The data to send

@return ResponseInterface
554918
public function sendData($data)
    {
        $data['verify_success'] = $this->isSignMatch();
        $data['is_paid']        = $data['verify_success'] && ($this->getRequestParam('respCode') == '00');

        return $this->response = new LegacyCompletePurchaseResponse($this, $data);
    }
1174552
protected function send($data)
    {
        try {
            $result = $this->client->send($data);

            if ($result === false) {
                $errorCode = $this->client->errCode;

                throw new TransportException('Send data failed, cause: '.socket_strerror($errorCode).'.',
                    TransportException::CONNECTION);
            }
        }  catch (TransportException $e) {
            throw $e;
        } catch (Throwable $e) {
            if ($this->causedByConnectionProblem($e)) {
                throw new TransportException($e->getMessage(), TransportException::CONNECTION, $e);
            }

            throw new TransportException($e->getMessage(), 0, $e);
        }

        return $result;
    }
1168326
public function sendData($data)
    {
        $response = $this->gocardless->subscriptions()->create($data);

        return $this->response = new SubscriptionResponse($this, $response);
    }
684026
public function sendData($data)
    {
        $this->httpClient->setConfig([
            'curl.options' => [
                CURLOPT_SSLVERSION => 1,
                CURLOPT_SSL_VERIFYHOST => 2,
                CURLOPT_SSL_VERIFYPEER => 1,
            ],
        ]);

        $httpResponse = $this->httpClient->post($this->getEndpoint(), null, $data)->send();
        $data['_result'] = $httpResponse->getBody(1);

        return $this->response = new CompletePurchaseResponse($this, $data);
    }
1298690
public function sendData($data)
    {
        $httpResponse = $this->httpClient->post($data['url'], null, $data['params'])->send();

        // The body is a string.
        $body = $httpResponse->getBody();

        // Split into lines.
        $data = json_decode($body);

        return $this->response = new OAuthConfirmResponse($this, $data);
    }
401784
public function sendData($data)
    {
        $data = parent::sendData($data);

        return $this->response = new AopTradeRefundQueryResponse($this, $data);
    }
296269
public function sendData($data)
    {
        $httpRequest = $this->httpClient->createRequest(
            $this->getHttpMethod(),
            $this->getEndpoint(),
            array(
                'Accept' => 'application/xml',
                'Content-type' => 'application/xml',
            ),
            $this->getRequestXml()->asXML()
        );


        // Might be useful to have some debug code here, PayPal especially can be
        // a bit fussy about data formats and ordering.  Perhaps hook to whatever
        // logging engine is being used.
        // echo "Data == " . json_encode($data) . "\n";

        try {
            $httpRequest->getCurlOptions()->set(CURLOPT_SSLVERSION, 6); // CURL_SSLVERSION_TLSv1_2 for libcurl < 7.35
            $httpResponse = $httpRequest->send();
            // Empty response body should be parsed also as and empty array
            $body = $httpResponse->getBody(true);
            $xmlResponse = !empty($body) ? $httpResponse->xml() : '';
            
            if ($xmlResponse instanceof \SimpleXMLElement) {
                $response = $xmlResponse->body->transaction;

                $response = json_decode(json_encode($response), true);

                return $this->response = $this->createResponse($response);
            }

            throw new InvalidResponseException('Error communicating with payment gateway');
        } catch (\Exception $e) {
            throw new InvalidResponseException(
                'Error communicating with payment gateway: ' . $e->getMessage(),
                $e->getCode()
            );
        }
    }
1048244
public function sendData($data): ResponseInterface
    {
        try {
            $requestBody = http_build_query($data);

            $httpResponse = $this->httpClient->get(
                $this->getEndpoint($this->getOrderId()),
                [
                    'Accept' => 'application/json',
                    'Authorization' => 'Bearer ' . $this->getAccessToken(),
                ],
                $requestBody
            )->send();

            $responseBody = (string) $httpResponse->getBody();
            $response = json_decode($responseBody, true) ?? [];

            return new DetailsResponse($this, $response);
        } catch (\Exception $e) {
            throw new InvalidResponseException(
                'Error communicating with payment gateway: ' . $e->getMessage(),
                $e->getCode()
            );
        }
    }
589029
public function sendData($data)
    {
        $response = $this->braintree->paymentMethod()->create($data);

        return $this->createResponse($response);
    }
846528
public function sendData($data)
    {
        $url = $this->getEndpoint() . '?' . http_build_query($data);
        $httpResponse = $this->httpClient->get($url)->send();

        $xml = $httpResponse->xml();
        return $this->createResponse($xml);
    }
293813
public function sendData($data)
    {
        $response = $this->gocardless->redirectFlows()->create(['params' => $data]);

        return $this->response = new RedirectAuthoriseResponse($this, $response);
    }
832659
public function sendData($data)
    {
        $request = new LegacyNotifyRequest($this->httpClient, $this->httpRequest);
        $request->initialize($this->parameters->all());
        $request->setParams($data);
        $request->setSort(false);
        $request->setAlipayPublicKey($this->getAlipayPublicKey());

        /**
         * @var LegacyNotifyResponse $response
         */
        $response = $request->send();

        return $response;
    }
582969
public function sendData($data)
    {
        $this->verifySignature();

        if ($this->params->has('notify_id')) {
            if ($this->verifyNotifyId) {
                $this->verifyNotifyId();
            }
        }

        return $this->response = new AopNotifyResponse($this, $data);
    }
1212622
public function sendData($data)
    {
        $data = parent::sendData($data);

        return $this->response = new AopTradeCancelResponse($this, $data);
    }
793255
public function sendData($data)
    {
        $data = parent::sendData($data);

        return $this->response = new AopTradeOrderSettleResponse($this, $data);
    }
642193
protected function request($data) {
    try {
      if ($this->method == 'delete') {
        $response = $this->client->{$this->method}($this->path(), [], $data);
      }
      else {
        $response = $this->client->{$this->method}($this->path(), $data);
      }
      $this->client->close();
    }
    catch (\Exception $e) {
      // Throw an expection if something goes wrong.
      $this->triggerError($e->getMessage());
    }
    return $this->response($response);
  }
248034
public function sendData($data)
    {
        $response = $this->braintree->customer()->find($this->getCustomerId());

        return $this->response = new CustomerResponse($this, $response);
    }