protected function parseResponse($body)
    {
        if ($body->getElementsByTagName('transaction')->length > 0) {
            $transaction = $body->getElementsByTagName('transaction')->item(0);

            $this->mpayTid = $transaction->getElementsByTagName('mpayTID')->item(0)->nodeValue;
            $this->tStatus = $transaction->getElementsByTagName('tStatus')->item(0)->nodeValue;
            $this->tid     = $transaction->getElementsByTagName('tid')->item(0)->nodeValue;

            if ($transaction->getElementsByTagName('stateID')->length > 0) {
                $this->stateId = $transaction->getElementsByTagName('stateID')->item(0)->nodeValue;
            }
        }
    }
protected function parseResponse($body)
    {
        if ($body->getElementsByTagName('transaction')->length > 0) {
            $transaction = $body->getElementsByTagName('transaction')->item(0);

            $this->mpayTid = $transaction->getElementsByTagName('mpayTID')->item(0)->nodeValue;
            $this->tStatus = $transaction->getElementsByTagName('tStatus')->item(0)->nodeValue;
            $this->tid     = $transaction->getElementsByTagName('tid')->item(0)->nodeValue;

            if ($transaction->getElementsByTagName('stateID')->length > 0) {
                $this->stateId = $transaction->getElementsByTagName('stateID')->item(0)->nodeValue;
            }
        }
    }
protected function parseResponse ( $ body ) { if ( $ body -> getElementsByTagName ( 'transaction' ) -> length > 0 ) { $ transaction = $ body -> getElementsByTagName ( 'transaction' ) -> item ( 0 ) ; $ this -> mpayTid = $ transaction -> getElementsByTagName ( 'mpayTID' ) -> item ( 0 ) -> nodeValue ; $ this -> tStatus = $ transaction -> getElementsByTagName ( 'tStatus' ) -> item ( 0 ) -> nodeValue ; $ this -> tid = $ transaction -> getElementsByTagName ( 'tid' ) -> item ( 0 ) -> nodeValue ; if ( $ transaction -> getElementsByTagName ( 'stateID' ) -> length > 0 ) { $ this -> stateId = $ transaction -> getElementsByTagName ( 'stateID' ) -> item ( 0 ) -> nodeValue ; } } }
Parse the Response message and save the data to the corresponding attributes

@param \DOMElement $body
Parse the Response message and save the data to the corresponding attributes