Sends notification via cURL

@param array $data Data array to be sent

@return array $this->nameData() Result
979479
public function requestIdn($data = array())
    {
        if (count($data) == 0) {
            $this->errorMessage[] = 'IDN DATA: EMPTY';
            return $this->nameData();
        }
        $data['MERCHANT'] = $this->merchantId;
        $this->refnoext = $data['REFNOEXT'];
        unset($data['REFNOEXT']);

        foreach ($this->hashFields as $fieldKey) {
            $data2[$fieldKey] = $data[$fieldKey];
        }
        $irnHash = $this->createHashString($data2);
        $data2['ORDER_HASH'] = $irnHash;
        $this->idnRequest = $data2;
        $this->logFunc("IDN", $this->idnRequest, $this->refnoext);

        $result = $this->startRequest($this->targetUrl, $this->idnRequest, 'POST');
        $this->debugMessage[] = 'IDN RESULT: ' . $result;

        if (is_string($result)) {
            $processed = $this->processResponse($result);
            $this->logFunc("IDN", $processed, $this->refnoext);
            return     $processed;
        }
        $this->debugMessage[] = 'IDN RESULT: NOT STRING';
        return false;
    }
100381
public function send(array $data)
    {
        $url = 'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=ACCESS_TOKEN';
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->callPostApi($url, $data, true);
    }
1125196
public function sendData($data)
    {
        if (isset($data['result'])) {
            $request = new AopVerifyAppPayReturnRequest($this->httpClient, $this->httpRequest);
            $request->initialize($this->parameters->all());
            $request->setEndpoint($this->getEndpoint());
            $request->setResult($data['result']);
            $request->setAlipayPublicKey($this->getAlipayPublicKey());
            $data = $request->send()->getData();
        } else {
            $request = new AopNotifyRequest($this->httpClient, $this->httpRequest);
            $request->initialize(['params' => $data]);
            $request->setEndpoint($this->getEndpoint());
            $request->setAlipayPublicKey($this->getAlipayPublicKey());
            $data = $request->send()->getData();

            if (! array_get($data, 'trade_status')) {
                $tn = array_get($data, 'trade_no');

                $request = new AopTradeQueryRequest($this->httpClient, $this->httpRequest);
                $request->initialize($this->getParameters());
                $request->setEndpoint($this->getEndpoint());
                $request->setBizContent(['trade_no' => $tn]);
                $request->setPrivateKey($this->getPrivateKey());

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

                $tradeStatus = $response->getAlipayResponse('trade_status');

                $data['trade_status'] = $tradeStatus;
            }
        }

        return $this->response = new AopCompletePurchaseResponse($this, $data);
    }
456318
public function sendData($data)
    {
        $headers  = $this->getHeaders();
        $gge4Date = $this->getGge4Date();
        $endpoint = $this->getEndpoint();

        $url = parse_url($endpoint);

        $contentDigest = sha1(json_encode($data));

        $hashString = $this->buildHashString($contentDigest, $gge4Date, $url['path']);

        $authString = $this->buildAuthString($hashString);

        $headers["X-GGe4-Content-SHA1"] = $contentDigest;
        $headers["X-GGe4-Date"]         = $gge4Date;
        $headers["Authorization"]       = $authString;

        $httpResponse = $this->httpClient->request(
            self::METHOD_POST,
            $endpoint,
            $headers,
            json_encode($data)
        );

        return $this->createResponse($httpResponse->getBody()->getContents());
    }
1164766
public function sendData($data)
    {
        $response = $this->braintree->transaction()->releaseFromEscrow($data['transactionId']);

        return $this->createResponse($response);
    }
1151235
public function sendData($data)
    {
        try {
            $response = $this->httpClient->post(
                $this->getEndpoint(),
                $this->getRequestHeaders(),
                json_encode($data)
            )->send();

            return new TokenPurchaseResponse($this, $response->json());
        } catch (BadResponseException $e) {
            $response = $e->getResponse();

            return new TokenPurchaseResponse($this, $response->json());
        }
    }
79490
public function delete ($data = null)
		{
			$this->_options[ CURLOPT_CUSTOMREQUEST ] = 'DELETE';
			if ($data != null)
				$this->_options[ CURLOPT_POSTFIELDS ] = is_array($data) ? http_build_query($data) : $data;

			return $this->send();
		}
543015
public function sendData($data)
    {
        $token = $this->braintree->clientToken()->generate($data);

        return new ClientTokenResponse($this, $token);
    }
947948
function send(&$data)
    {
        if (
        	is_callable($this->send_callback)
			&& false === call_user_func_array($this->send_callback, array(&$data))
		) {
            // if send_callback returns false, end native send
            return;
        }

        if (!$this->server) {
            return;
        }

        if ($this->transport) {
            return call_user_func($this->transport, $this, $data);
        }

        $message = $this->encode($data);

        $headers = array(
            'User-Agent' => $this->getUserAgent(),
            'X-Sentry-Auth' => $this->getAuthHeader(),
            'Content-Type' => 'application/octet-stream'
        );

        $this->send_remote($this->server, $message, $headers);
    }
1212622
public function sendData($data)
    {
        $data = parent::sendData($data);

        return $this->response = new AopTradeCancelResponse($this, $data);
    }
42988
public function sendData($data)
    {
        $response = $this->braintree->customer()->delete($data);

        return $this->createResponse($response);
    }
377103
public function sendSubscription(array $data = [])
    {
        $params = $this->formatMessage($data);

        $this->restoreMessage();

        return $this->httpPostJson('cgi-bin/message/template/subscribe', $params);
    }
293813
public function sendData($data)
    {
        $response = $this->gocardless->redirectFlows()->create(['params' => $data]);

        return $this->response = new RedirectAuthoriseResponse($this, $response);
    }
843639
public function sendData($data)
    {
        $response = $this->gocardless->payments()->update($data['paymentId'], $data['paymentData']);

        return $this->response = new PaymentResponse($this, $response);
    }
223622
protected function sendNotification($name, array $data)
    {
        $this
            ->getSession()
            ->getPoolerForType('listener')
            ->notify($name, $data)
            ;

        return $this;
    }
1151784
protected function send($data)
    {
        $this->debug("Send: $data");

        $result = $this->socket->write($data);
        if (!$result || PEAR::isError($result)) {
            $msg = $result ? $result->getMessage() : "unknown error";
            return PEAR::raiseError("Failed to write to socket: $msg");
        }

        return $result;
    }
333905
public function found(array $data): Response
    {
        $this->response->setBody(json_encode(['data' => $data]));
        return $this->response;
    }