You are here

function _uc_authorizenet_array_to_xml in Ubercart 6.2

Same name and namespace in other branches
  1. 8.4 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_array_to_xml()
  2. 5 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_array_to_xml()
  3. 7.3 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_array_to_xml()
7 calls to _uc_authorizenet_array_to_xml()
uc_authorizenet_arb_cancel in payment/uc_authorizenet/uc_authorizenet.module
Cancels an ARB subscription.
uc_authorizenet_arb_create in payment/uc_authorizenet/uc_authorizenet.module
Sends an ARB Create request via the XML API.
uc_authorizenet_arb_update in payment/uc_authorizenet/uc_authorizenet.module
Updates an ARB subscription; for simplicity's sake, payment schedule information cannot be updated at this time.
_uc_authorizenet_cim_payment_profile_get in payment/uc_authorizenet/uc_authorizenet.module
Get a CIM payment profile stored at auth.net.
_uc_authorizenet_cim_profile_charge in payment/uc_authorizenet/uc_authorizenet.module
Use a reference to charge to a CIM profile.

... See full list

File

payment/uc_authorizenet/uc_authorizenet.module, line 1001
Process payments using Authorize.net. Supports AIM and ARB.

Code

function _uc_authorizenet_array_to_xml($data) {
  $xml = '';

  // Loop through the elements in the data array.
  foreach ($data as $element => $contents) {
    if (is_array($contents)) {

      // Render the element with its child elements.
      $xml .= '<' . $element . '>' . _uc_authorizenet_array_to_xml($contents) . '</' . $element . '>';
    }
    else {

      // Render the element with its contents.
      $xml .= '<' . $element . '>' . htmlspecialchars($contents) . '</' . $element . '>';
    }
  }
  return $xml;
}