function _uc_authorizenet_array_to_xml in Ubercart 8.4
Same name and namespace in other branches
- 5 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_array_to_xml()
- 6.2 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_array_to_xml()
- 7.3 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_array_to_xml()
Converts a hierarchical array of elements into an XML string.
4 calls to _uc_authorizenet_array_to_xml()
- _uc_authorizenet_cim_payment_profile_get in payment/
uc_authorizenet/ uc_authorizenet.module - Gets a CIM payment profile stored at auth.net.
- _uc_authorizenet_cim_profile_charge in payment/
uc_authorizenet/ uc_authorizenet.module - Uses a reference to charge to a CIM profile.
- _uc_authorizenet_cim_profile_create in payment/
uc_authorizenet/ uc_authorizenet.module - Creates a CIM profile using an order's data.
- _uc_authorizenet_cim_profile_get in payment/
uc_authorizenet/ uc_authorizenet.module - Gets a CIM profile stored at Authorize.Net.
File
- payment/
uc_authorizenet/ uc_authorizenet.module, line 211 - Processes 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;
}