original_string: 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;
              }
          }
      }
code: 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;
              }
          }
      }
code_tokens: 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 ; } } }
docstring: Parse the Response message and save the data to the corresponding attributes
  
  @param \DOMElement $body
docstring_tokens: Parse the Response message and save the data to the corresponding attributes