protected function performRequest($request, $transaction): RequestResponseInterface
    {
        //raising event
        $event = new GatewayRequestEvent([
            'type' => $transaction->type,
            'request' => $request,
            'transaction' => $transaction
        ]);

        // Raise 'beforeGatewayRequestSend' event
        $this->trigger(self::EVENT_BEFORE_GATEWAY_REQUEST_SEND, $event);

        $response = $this->sendRequest($request);

        return $this->prepareResponse($response, $transaction);
    }