public function toXMLString() { $str = ''; if ($this->CreditCardType != null) { $str .= '<ebl:CreditCardType>' . PPUtils::escapeInvalidXmlCharsRegex($this->CreditCardType) . '</ebl:CreditCardType>'; } if ($this->CreditCardNumber != null) { $str .= '<ebl:CreditCardNumber>' . PPUtils::escapeInvalidXmlCharsRegex($this->CreditCardNumber) . '</ebl:CreditCardNumber>'; } if ($this->ExpMonth != null) { $str .= '<ebl:ExpMonth>' . PPUtils::escapeInvalidXmlCharsRegex($this->ExpMonth) . '</ebl:ExpMonth>'; } if ($this->ExpYear != null) { $str .= '<ebl:ExpYear>' . PPUtils::escapeInvalidXmlCharsRegex($this->ExpYear) . '</ebl:ExpYear>'; } if ($this->CardOwner != null) { $str .= '<ebl:CardOwner>'; $str .= $this->CardOwner->toXMLString(); $str .= '</ebl:CardOwner>'; } if ($this->CVV2 != null) { $str .= '<ebl:CVV2>' . PPUtils::escapeInvalidXmlCharsRegex($this->CVV2) . '</ebl:CVV2>'; } if ($this->StartMonth != null) { $str .= '<ebl:StartMonth>' . PPUtils::escapeInvalidXmlCharsRegex($this->StartMonth) . '</ebl:StartMonth>'; } if ($this->StartYear != null) { $str .= '<ebl:StartYear>' . PPUtils::escapeInvalidXmlCharsRegex($this->StartYear) . '</ebl:StartYear>'; } if ($this->IssueNumber != null) { $str .= '<ebl:IssueNumber>' . PPUtils::escapeInvalidXmlCharsRegex($this->IssueNumber) . '</ebl:IssueNumber>'; } if ($this->ThreeDSecureRequest != null) { $str .= '<ebl:ThreeDSecureRequest>'; $str .= $this->ThreeDSecureRequest->toXMLString(); $str .= '</ebl:ThreeDSecureRequest>'; } return $str; }
public function toXMLString() { $str = ''; if ($this->CreditCardType != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:CreditCardType>' . $this->CreditCardType . '</ebl:CreditCardType>'; } if ($this->CreditCardNumber != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:CreditCardNumber>' . $this->CreditCardNumber . '</ebl:CreditCardNumber>'; } if ($this->ExpMonth != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:ExpMonth>' . $this->ExpMonth . '</ebl:ExpMonth>'; } if ($this->ExpYear != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:ExpYear>' . $this->ExpYear . '</ebl:ExpYear>'; } if ($this->CardOwner != null) { //prop is not a collection //prop is complex //prop is not enum //does not contain attribute or is attribute $str .= '<ebl:CardOwner>'; $str .= $this->CardOwner->toXMLString(); $str .= '</ebl:CardOwner>'; } if ($this->CVV2 != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:CVV2>' . $this->CVV2 . '</ebl:CVV2>'; } if ($this->StartMonth != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:StartMonth>' . $this->StartMonth . '</ebl:StartMonth>'; } if ($this->StartYear != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:StartYear>' . $this->StartYear . '</ebl:StartYear>'; } if ($this->IssueNumber != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:IssueNumber>' . $this->IssueNumber . '</ebl:IssueNumber>'; } if ($this->ThreeDSecureRequest != null) { //prop is not a collection //prop is complex //prop is not enum //does not contain attribute or is attribute $str .= '<ebl:ThreeDSecureRequest>'; $str .= $this->ThreeDSecureRequest->toXMLString(); $str .= '</ebl:ThreeDSecureRequest>'; } return $str; }