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

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

        $hpsBlock1->appendChild($xml->createElement('hps:Action', $this->action));
        $hpsBlock1->appendChild($xml->createElement('hps:Alias', $this->alias));

        if ($this->token != null && ($this->token instanceof HpsTokenData)) {
            if ($this->card == null) {
                $this->card = new HpsGiftCard();
            }
            $this->card->tokenValue = $this->token->tokenValue;
        }
        $cardData = $this->service->_hydrateGiftCardData($this->card, $xml);
        $hpsBlock1->appendChild($cardData);

        $hpsGiftAlias->appendChild($hpsBlock1);
        $hpsTransaction->appendChild($hpsGiftAlias);

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

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

        $hpsBlock1->appendChild($xml->createElement('hps:Action', $this->action));
        $hpsBlock1->appendChild($xml->createElement('hps:Alias', $this->alias));

        if ($this->token != null && ($this->token instanceof HpsTokenData)) {
            if ($this->card == null) {
                $this->card = new HpsGiftCard();
            }
            $this->card->tokenValue = $this->token->tokenValue;
        }
        $cardData = $this->service->_hydrateGiftCardData($this->card, $xml);
        $hpsBlock1->appendChild($cardData);

        $hpsGiftAlias->appendChild($hpsBlock1);
        $hpsTransaction->appendChild($hpsGiftAlias);

        return $this->service->_submitTransaction($hpsTransaction, 'GiftCardAlias');
    }
public function execute ( ) { parent :: execute ( ) ; $ xml = new DOMDocument ( ) ; $ hpsTransaction = $ xml -> createElement ( 'hps:Transaction' ) ; $ hpsGiftAlias = $ xml -> createElement ( 'hps:GiftCardAlias' ) ; $ hpsBlock1 = $ xml -> createElement ( 'hps:Block1' ) ; $ hpsBlock1 -> appendChild ( $ xml -> createElement ( 'hps:Action' , $ this -> action ) ) ; $ hpsBlock1 -> appendChild ( $ xml -> createElement ( 'hps:Alias' , $ this -> alias ) ) ; if ( $ this -> token != null && ( $ this -> token instanceof HpsTokenData ) ) { if ( $ this -> card == null ) { $ this -> card = new HpsGiftCard ( ) ; } $ this -> card -> tokenValue = $ this -> token -> tokenValue ; } $ cardData = $ this -> service -> _hydrateGiftCardData ( $ this -> card , $ xml ) ; $ hpsBlock1 -> appendChild ( $ cardData ) ; $ hpsGiftAlias -> appendChild ( $ hpsBlock1 ) ; $ hpsTransaction -> appendChild ( $ hpsGiftAlias ) ; return $ this -> service -> _submitTransaction ( $ hpsTransaction , 'GiftCardAlias' ) ; }
Creates an alias transaction through the HpsGiftCardService
Creates an alias transaction through the HpsGiftCardService