Send data request
@param  [type] $data [description]
@return [type]       [description]
176072
public function sendData($data)
    {
        // enforce TLS >= v1.2 (https://www.payway.com.au/rest-docs/index.html#basics)
        $config = $this->httpClient->getConfig();
        $curlOptions = $config->get('curl.options');
        $curlOptions[CURLOPT_SSLVERSION] = 6;
        $config->set('curl.options', $curlOptions);
        $this->httpClient->setConfig($config);

        // don't throw exceptions for 4xx errors
        $this->httpClient->getEventDispatcher()->addListener(
            'request.error',
            function ($event) {
                if ($event['response']->isClientError()) {
                    $event->stopPropagation();
                }
            }
        );

        if ($this->getSSLCertificatePath()) {
            $this->httpClient->setSslVerification($this->getSSLCertificatePath());
        }

        $request = $this->httpClient->createRequest(
            $this->getHttpMethod(),
            $this->getEndpoint(),
            $this->getRequestHeaders(),
            $data
        );

        // get the appropriate API key
        $apikey = ($this->getUseSecretKey()) ? $this->getApiKeySecret() : $this->getApiKeyPublic();
        $request->setHeader('Authorization', 'Basic ' . base64_encode($apikey . ':'));

        // send the request
        $response = $request->send();

        $this->response = new Response($this, $response->json());

        // save additional info
        $this->response->setHttpResponseCode($response->getStatusCode());
        $this->response->setTransactionType($this->getTransactionType());

        return $this->response;
    }
1326304
public function sendData($data)
    {
        $response = $this->gocardless->bankDetailsLookups()->create($data);

        return $this->response = new BankDetailsResponse($this, $response);
    }
1097545
public function sendData($data)
    {
        $response = $this->braintree->transaction()->void($data['transactionReference']);

        return $this->createResponse($response);
    }
589029
public function sendData($data)
    {
        $response = $this->braintree->paymentMethod()->create($data);

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

        return $this->response = new RedirectAuthoriseResponse($this, $response);
    }
664217
public function sendRequest(array $data): ResponseInterface
    {
        $options[RequestOptions::BODY] = $this->encodingService->encodeJson($data);

        return $this->send($options);
    }
651735
public function sendData($data)
    {
        $endpoint = $this->getEndpoint();
        $headers = array(
            'Content-Type' => 'text/xml; charset=utf-8',
            'SOAPAction' => $endpoint.'/'.$this->getMethod(),
        );

        $httpResponse = $this->httpClient->post($endpoint, $headers, $data)->send();

        return $this->createResponse($httpResponse->xml());
    }
1337727
public function sendData($data)
    {
        if ($this->sendData === null) {
            $this->sendData = $this->getData();
        }

        $data = $this->createSOAPEnvelope(
            $this->prepareParameters(
                $this->sendData
            )
        );

        $headers = array(
            'Content-Type' => 'text/xml; charset=utf-8',
            'SOAPAction' => $this->method
        );

        $httpResponse = $this->httpClient->post(
            $this->getEndpoint(),
            $headers,
            $data
        )->send();

        return $this->response = new Response($this, $httpResponse->getBody());
    }
539827
public function sendData($data)
    {
        $response = $this->braintree->transaction()->refund($data['transactionReference'], $data['amount']);

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

        return $this->response = new SubscriptionResponse($this, $response);
    }
1109306
public function sendData($data)
    {
        $httpResponse = $this->sendRequest('GET', '/gateways', json_encode($data));

        $this->response = new RestFetchPaymentMethodsResponse(
            $this,
            json_decode($httpResponse->getBody()->getContents(), true)
        );

        return $this->response;
    }
983824
public function sendData($data)
    {
        $response = $this->braintree->subscription()->create($data);

        return $this->response = new SubscriptionResponse($this, $response);
    }
654751
public function sendData($data)
    {
        $response = $this->braintree->paymentMethod()->update($data['token'], $data);

        return $this->createResponse($response);
    }
882342
public function sendData($data)
    {
        $response = $this->gocardless->subscriptions()->update($data['subscriptionId'], $data['subscriptionData']);

        return $this->response = new SubscriptionResponse($this, $response);
    }
934087
public function put ($data)
		{
			$this->_options[ CURLOPT_CUSTOMREQUEST ] = 'PUT';
			$this->_options[ CURLOPT_POSTFIELDS ] = http_build_query($data);

			return $this->send();
		}
606248
public function sendData($data)
    {
        $response = $this->gocardless->mandates()->reinstate($this->getMandateReference());

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

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