public function execute()
    {
        parent::execute();

        $xml = new DOMDocument();
        $hpsTransaction = $xml->createElement('hps:Transaction');
        $hpsCreditAccountVerify = $xml->createElement('hps:CreditAccountVerify');
        $hpsBlock1 = $xml->createElement('hps:Block1');

        if ($this->cardHolder != null) {
            $hpsBlock1->appendChild($this->service->_hydrateCardHolderData($this->cardHolder, $xml));
        }

        $cardData = $xml->createElement('hps:CardData');
        if ($this->card != null) {
            $cardData->appendChild($this->service->_hydrateManualEntry(
                $this->card,
                $xml,
                $this->cardPresent,
                $this->readerPresent
            ));
            if ($this->card->encryptionData != null) {
                $cardData->appendChild($this->service->_hydrateEncryptionData(
                    $this->card->encryptionData,
                    $xml
                ));
            }
        } else if ($this->token != null) {
            $cardData->appendChild($this->service->_hydrateTokenData(
                $this->token,
                $xml,
                $this->cardPresent,
                $this->readerPresent
            ));
        } else if ($this->trackData != null) {
            $cardData->appendChild($this->service->_hydrateTrackData($this->trackData, $xml));
            if ($this->trackData->encryptionData != null) {
                $cardData->appendChild($this->service->_hydrateEncryptionData(
                    $this->trackData->encryptionData,
                    $xml
                ));
            }
        }
        $cardData->appendChild($xml->createElement('hps:TokenRequest', ($this->requestMultiUseToken) ? 'Y' : 'N'));

        $hpsBlock1->appendChild($cardData);
        $hpsCreditAccountVerify->appendChild($hpsBlock1);
        $hpsTransaction->appendChild($hpsCreditAccountVerify);

        return $this->service->_submitTransaction($hpsTransaction, 'CreditAccountVerify', $this->clientTransactionId);
    }
public function execute()
    {
        parent::execute();

        $xml = new DOMDocument();
        $hpsTransaction = $xml->createElement('hps:Transaction');
        $hpsCreditAccountVerify = $xml->createElement('hps:CreditAccountVerify');
        $hpsBlock1 = $xml->createElement('hps:Block1');

        if ($this->cardHolder != null) {
            $hpsBlock1->appendChild($this->service->_hydrateCardHolderData($this->cardHolder, $xml));
        }

        $cardData = $xml->createElement('hps:CardData');
        if ($this->card != null) {
            $cardData->appendChild($this->service->_hydrateManualEntry(
                $this->card,
                $xml,
                $this->cardPresent,
                $this->readerPresent
            ));
            if ($this->card->encryptionData != null) {
                $cardData->appendChild($this->service->_hydrateEncryptionData(
                    $this->card->encryptionData,
                    $xml
                ));
            }
        } else if ($this->token != null) {
            $cardData->appendChild($this->service->_hydrateTokenData(
                $this->token,
                $xml,
                $this->cardPresent,
                $this->readerPresent
            ));
        } else if ($this->trackData != null) {
            $cardData->appendChild($this->service->_hydrateTrackData($this->trackData, $xml));
            if ($this->trackData->encryptionData != null) {
                $cardData->appendChild($this->service->_hydrateEncryptionData(
                    $this->trackData->encryptionData,
                    $xml
                ));
            }
        }
        $cardData->appendChild($xml->createElement('hps:TokenRequest', ($this->requestMultiUseToken) ? 'Y' : 'N'));

        $hpsBlock1->appendChild($cardData);
        $hpsCreditAccountVerify->appendChild($hpsBlock1);
        $hpsTransaction->appendChild($hpsCreditAccountVerify);

        return $this->service->_submitTransaction($hpsTransaction, 'CreditAccountVerify', $this->clientTransactionId);
    }
public function execute ( ) { parent :: execute ( ) ; $ xml = new DOMDocument ( ) ; $ hpsTransaction = $ xml -> createElement ( 'hps:Transaction' ) ; $ hpsCreditAccountVerify = $ xml -> createElement ( 'hps:CreditAccountVerify' ) ; $ hpsBlock1 = $ xml -> createElement ( 'hps:Block1' ) ; if ( $ this -> cardHolder != null ) { $ hpsBlock1 -> appendChild ( $ this -> service -> _hydrateCardHolderData ( $ this -> cardHolder , $ xml ) ) ; } $ cardData = $ xml -> createElement ( 'hps:CardData' ) ; if ( $ this -> card != null ) { $ cardData -> appendChild ( $ this -> service -> _hydrateManualEntry ( $ this -> card , $ xml , $ this -> cardPresent , $ this -> readerPresent ) ) ; if ( $ this -> card -> encryptionData != null ) { $ cardData -> appendChild ( $ this -> service -> _hydrateEncryptionData ( $ this -> card -> encryptionData , $ xml ) ) ; } } else if ( $ this -> token != null ) { $ cardData -> appendChild ( $ this -> service -> _hydrateTokenData ( $ this -> token , $ xml , $ this -> cardPresent , $ this -> readerPresent ) ) ; } else if ( $ this -> trackData != null ) { $ cardData -> appendChild ( $ this -> service -> _hydrateTrackData ( $ this -> trackData , $ xml ) ) ; if ( $ this -> trackData -> encryptionData != null ) { $ cardData -> appendChild ( $ this -> service -> _hydrateEncryptionData ( $ this -> trackData -> encryptionData , $ xml ) ) ; } } $ cardData -> appendChild ( $ xml -> createElement ( 'hps:TokenRequest' , ( $ this -> requestMultiUseToken ) ? 'Y' : 'N' ) ) ; $ hpsBlock1 -> appendChild ( $ cardData ) ; $ hpsCreditAccountVerify -> appendChild ( $ hpsBlock1 ) ; $ hpsTransaction -> appendChild ( $ hpsCreditAccountVerify ) ; return $ this -> service -> _submitTransaction ( $ hpsTransaction , 'CreditAccountVerify' , $ this -> clientTransactionId ) ; }
Creates a verify transaction through the HpsCreditService
Creates a verify transaction through the HpsCreditService