protected function submitTransaction(
        $request,
        $txnType
    ) {
        $request = array_merge($request, array('MsgType' => $txnType));
        $response = $this->doRequest($request);

        $this->processGatewayResponse($response);
        $this->processProcessorResponse($response);

        $result = null;

        switch ($txnType) {
        case 'cmpi_lookup':
            $result = HpsCardinalMPILookupResponse::fromObject($response);
            break;
        case 'cmpi_authenticate':
            $result = HpsCardinalMPIAuthenticateResponse::fromObject($response);
            break;
        case 'cmpi_baseserver_api':
            $result = HpsCardinalMPIPreapprovalResponse::fromObject($response);
            break;
        case 'cmpi_authorize':
            $result = HpsCardinalMPIAuthorizeResponse::fromObject($response);
            break;
        case 'cmpi_capture':
            $result = HpsCardinalMPICaptureResponse::fromObject($response);
            break;
        case 'cmpi_refund':
            $result = HpsCardinalMPIRefundResponse::fromObject($response);
            break;
        case 'cmpi_void':
            $result = HpsCardinalMPIVoidResponse::fromObject($response);
            break;
        case 'cmpi_add_order_number':
            $result = HpsCardinalMPIAddOrderNumberResponse::fromObject($response);
            break;
        }
        return $result;
    }
protected function submitTransaction(
        $request,
        $txnType
    ) {
        $request = array_merge($request, array('MsgType' => $txnType));
        $response = $this->doRequest($request);

        $this->processGatewayResponse($response);
        $this->processProcessorResponse($response);

        $result = null;

        switch ($txnType) {
        case 'cmpi_lookup':
            $result = HpsCardinalMPILookupResponse::fromObject($response);
            break;
        case 'cmpi_authenticate':
            $result = HpsCardinalMPIAuthenticateResponse::fromObject($response);
            break;
        case 'cmpi_baseserver_api':
            $result = HpsCardinalMPIPreapprovalResponse::fromObject($response);
            break;
        case 'cmpi_authorize':
            $result = HpsCardinalMPIAuthorizeResponse::fromObject($response);
            break;
        case 'cmpi_capture':
            $result = HpsCardinalMPICaptureResponse::fromObject($response);
            break;
        case 'cmpi_refund':
            $result = HpsCardinalMPIRefundResponse::fromObject($response);
            break;
        case 'cmpi_void':
            $result = HpsCardinalMPIVoidResponse::fromObject($response);
            break;
        case 'cmpi_add_order_number':
            $result = HpsCardinalMPIAddOrderNumberResponse::fromObject($response);
            break;
        }
        return $result;
    }
protected function submitTransaction ( $ request , $ txnType ) { $ request = array_merge ( $ request , array ( 'MsgType' => $ txnType ) ) ; $ response = $ this -> doRequest ( $ request ) ; $ this -> processGatewayResponse ( $ response ) ; $ this -> processProcessorResponse ( $ response ) ; $ result = null ; switch ( $ txnType ) { case 'cmpi_lookup' : $ result = HpsCardinalMPILookupResponse :: fromObject ( $ response ) ; break ; case 'cmpi_authenticate' : $ result = HpsCardinalMPIAuthenticateResponse :: fromObject ( $ response ) ; break ; case 'cmpi_baseserver_api' : $ result = HpsCardinalMPIPreapprovalResponse :: fromObject ( $ response ) ; break ; case 'cmpi_authorize' : $ result = HpsCardinalMPIAuthorizeResponse :: fromObject ( $ response ) ; break ; case 'cmpi_capture' : $ result = HpsCardinalMPICaptureResponse :: fromObject ( $ response ) ; break ; case 'cmpi_refund' : $ result = HpsCardinalMPIRefundResponse :: fromObject ( $ response ) ; break ; case 'cmpi_void' : $ result = HpsCardinalMPIVoidResponse :: fromObject ( $ response ) ; break ; case 'cmpi_add_order_number' : $ result = HpsCardinalMPIAddOrderNumberResponse :: fromObject ( $ response ) ; break ; } return $ result ; }
Submits a transaction to the gateway

@param array<string, string> $request request payload
@param string                $txnType type of transaction to be ran

@return object
Submits a transaction to the gateway