function raise($msg, $code, $severity = 'Error', $errClass = 'SystemError') { $err = new ErrorType(); $err->setErrorCode($code); $err->setSeverityCode($severity); $err->setLongMessage(htmlentities($msg)); $err->setErrorClassification($errClass); $this->_reduceElement($err); $this->Errors[] = $err; }
public function init($arr = null) { if ($arr != null) { foreach ($arr as $arry) { if ($arry != null && isset($arry['text']) && $arry['name'] == 'transactionid') { $this->TransactionId = $arry["text"]; } if ($arry != null && isset($arry['text']) && $arry['name'] == 'paymentrequestid') { $this->PaymentRequestID = $arry["text"]; } if (is_array($arry["children"]) && $arry["children"] != null) { if ($arry["name"] == 'paymenterror') { $this->PaymentError = new ErrorType(); $this->PaymentError->init($arry["children"]); } } } } }