src/base/Gateway.php
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);
    }
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);
    }
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 ) ; }
Perform a request and return the response.

@param $request
@param $transaction

@return RequestResponseInterface
@throws GatewayRequestCancelledException
Perform a request and return the response .