Source of file PxPayMessage.php
Size: 2,249 Bytes - Last Modified: 2021-12-23T10:33:30+00:00
/var/www/docs.ssmods.com/process/src/thirdparty/PxPayMessage.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 | <?php /** * @package payment_dpshosted * @see http://civicrm.org */ #****************************************************************************** # Abstract base class for PxPay messages. # These are messages with certain defined elements, which can be serialized to XML. #****************************************************************************** class PxPayMessage { var $TxnType; var $TxnData1; var $TxnData2; var $TxnData3; var $MerchantReference; var $EmailAddress; var $BillingId; var $DpsBillingId; var $DpsTxnRef; function PxPayMessage(){ } function setDpsTxnRef($DpsTxnRef){ $this->DpsTxnRef = $DpsTxnRef; } function getDpsTxnRef(){ return $this->DpsTxnRef; } function setDpsBillingId($DpsBillingId){ $this->DpsBillingId = $DpsBillingId; } function getDpsBillingId(){ return $this->DpsBillingId; } function setBillingId($BillingId){ $this->BillingId = $BillingId; } function getBillingId(){ return $this->BillingId; } function setTxnType($TxnType){ $this->TxnType = $TxnType; } function getTxnType(){ return $this->TxnType; } function setMerchantReference($MerchantReference){ $this->MerchantReference = $MerchantReference; } function getMerchantReference(){ return $this->MerchantReference; } function setEmailAddress($EmailAddress){ $this->EmailAddress = $EmailAddress; } function getEmailAddress(){ return $this->EmailAddress; } function setTxnData1($TxnData1){ $this->TxnData1 = $TxnData1; } function getTxnData1(){ return $this->TxnData1; } function setTxnData2($TxnData2){ $this->TxnData2 = $TxnData2; } function getTxnData2(){ return $this->TxnData2; } function getTxnData3(){ return $this->TxnData3; } function setTxnData3($TxnData3){ $this->TxnData3 = $TxnData3; } function toXml(){ $arr = get_object_vars($this); $root = strtolower(get_class($this)); #echo "<br>root:".$root; if($root == "pxpayrequest") $root = "GenerateRequest"; elseif ($root == "pxpayresponse") $root = "Response"; else $root ="Request"; $xml = "<$root>"; while (list($prop, $val) = each($arr)) $xml .= "<$prop>$val</$prop>" ; $xml .= "</$root>"; return $xml; } } |