Permalink
Browse files

Updated: Minor eZ Publish 4.3 improvements. Replaced example eZXML us…

…age.
  • Loading branch information...
1 parent fb5866b commit 79faecc179e9767d09148165c7334689bc64a6f7 @brookinsconsulting committed Oct 22, 2010
Showing with 19 additions and 17 deletions.
  1. +5 −3 classes/ezauthorizegateway.php
  2. +2 −2 classes/ezauthorizeinfo.php
  3. +4 −4 classes/ezauthorizerefund.php
  4. +8 −8 classes/ezcurlgateway.php
@@ -62,7 +62,9 @@ function _loadAccountHandlerData( &$process )
$processParams = $process->attribute( 'parameter_list' );
$order = eZOrder::fetch( $processParams['order_id'] );
$xmlDoc = $order->attribute( 'data_text_1' );
-eZDebug::writeDebug($xmlDoc);
+
+ eZDebug::writeDebug( $xmlDoc );
+
$this->data = simplexml_load_string( $order->attribute( 'data_text_1' ) );
if ( $ini->variable( 'eZAuthorizeSettings', 'StoreTransactionInformation', 'ezauthorize.ini') == true )
{
@@ -393,7 +395,7 @@ function doCURL( &$process )
*/
function getOrderInfo( $order )
{
- include_once( 'lib/ezxml/classes/ezxml.php' );
+ // include_once( 'lib/ezxml/classes/ezxml.php' );
// get order information out of XML
$xml = simplexml_load_string( $order->attribute( 'data_text_1' ) );
@@ -523,4 +525,4 @@ function addShipping( &$aim )
eZPaymentGatewayType::registerGateway( eZAuthorizeGateway::GATEWAY_TYPE, "ezauthorizegateway", "Authorize.Net" );
-?>
+?>
@@ -6,7 +6,7 @@
used by the extension recurringorders
*/
-include_once( eZExtension::baseDirectory() . '/recurringorders/datatypes/ezcreditcard/ezcreditcardtype.php' );
+// include_once( eZExtension::baseDirectory() . '/recurringorders/datatypes/ezcreditcard/ezcreditcardtype.php' );
class eZAuthorizeInfo
{
@@ -40,7 +40,7 @@ function isCardAvailable ( $type )
This can be called like eZAuthorizeInfo::validateCardData( $contentObjectAttribute, $classAttribute, $data )
*/
function validateCardData( $contentObjectAttribute, $classAttribute, $data )
- {
+ {
$error = false;
if ( $data['name'] == '' )
{
@@ -20,11 +20,11 @@
// this licencing isn't clear to you.
//
-include_once( 'lib/ezutils/classes/ezini.php' );
-include_once( 'kernel/classes/ezorder.php' );
-include_once( 'lib/ezxml/classes/ezxml.php' );
+// include_once( 'lib/ezutils/classes/ezini.php' );
+// include_once( 'kernel/classes/ezorder.php' );
+// include_once( 'lib/ezxml/classes/ezxml.php' );
-include_once( 'extension/ezauthorize/classes/ezauthorizeaim.php' );
+// include_once( 'extension/ezauthorize/classes/ezauthorizeaim.php' );
class ezAuthorizeRefund
{
View
@@ -45,7 +45,7 @@
define( "EZ_CURL_GATEWAY_DO_CURL", 2 );
-include_once( 'kernel/shop/classes/ezpaymentgateway.php' );
+// include_once( 'kernel/shop/classes/ezpaymentgateway.php' );
class eZCurlGateway extends eZPaymentGateway
{
@@ -93,16 +93,16 @@ function createDOMTreefromArray( $name, $array )
function createArrayfromXML( $xmlDoc )
{
$result = array();
- $xml = new eZXML();
- $dom = $xml->domTree( $xmlDoc );
- $node = $dom->get_root();
- $children = $node->children();
+ $xml = new DOMDocument();
+ $dom = $xml->loadXML( $xmlDoc );
+ $node = $dom->documentElement();
+ $children = $node->childNodes;
foreach ( $children as $child )
{
- $contentnode = $child->firstChild();
- if ( $contentnode->type === EZ_XML_NODE_TEXT )
+ $contentnode = $child->firstChild;
+ if ( $contentnode->nodeType === EZ_XML_NODE_TEXT )
{
- $result[$child->name()] = $contentnode->textContent();
+ $result[$child->localName] = $contentnode->textContent;
}
else
{

0 comments on commit 79faecc

Please sign in to comment.