List Info

Thread: Re: Error parsing XML; message from parser is: The markup in the d




Re: Error parsing XML; message from parser is: The markup in the d
country flaguser name
United States
2007-11-05 04:23:42
Which File Can I Use, Instead of googlecheckout_handler.php?
I have
bad experiences with PHP CODE.

Thanks,

On Nov 3, 3:52 am, Bob Hutchinson <hu...arwystli.net> wrote:
> On Saturday 03 November 2007 05:04, i...fragrancesky.com wrote:
>
> > I found error:
> > Warnings:
> > XML We Received:
>
> > <br />
> > <b>Fatal error</b>:  Call to undefined
function:  getallheaders() in
> >
<b>/home/fragran2/public_html/googlecheckout_handler.p
hp</b> on line
> > <b>75</b><br />
>
> Use the most recent samplecode, it does not use
function getallheaders()
>
> http://google-checkout-php-sample-code.g
ooglecode.com/files/google-ch...
>
>
>
>
>
> > XML We Sent:
> > <?xml version="1.0"
encoding="UTF-8"?>
> > <merchant-calculation-callback xmlns="http://checkout.google.co
m/
> > schema/2"
serial-number="813e1524-a79a-4689-8f0d-f8040e851f44&quo
t;>
> >   <shopping-cart>
> >     <items>
> >       <item>
> >         <item-name>English Leather Spiced
Cologne 4 oz Splash</item-
> > name>
> >        
<item-description></item-description>
> >         <unit-price
currency="USD">34.99</unit-price>
> >         <quantity>2</quantity>
> >       </item>
> >     </items>
> >     <merchant-private-data>
> >       <order-data>
> >         <discount-percent />
> >        
<customer-firstname>-</customer-firstname>
> >        
<customer-lastname>-</customer-lastname>
> >        
<customer-email>-</customer-email>
> >        
<customer-ip>24.199.81.146</customer-ip>
> >        
<customer-id>238</customer-id>
> >        
<freight-cost>0.00</freight-cost>
> >         <affiliate-id />
> >       </order-data>
> >       <cart-
> >
content>PGl0ZW1zPjxpdGVtIGlkPSI2ODEiPjxwcm9kdWN0IGlkPSI2N
jg5IiBmcmVlLXNoaXB
> >waW5nPSIwIj48L3Byb2R1Y3Q
> >
+PHF1YW50aXR5PjwhW0NEQVRBWzJdXT48L3F1YW50aXR5Pjx2YXJpYW50cz4
8L3ZhcmlhbnRzPj
>
>xwcmljZSBjdXJyZW5jeT0iIj48IVtDREFUQVszNC45OV1dPjwvcHJpY2
U
> > +PC9pdGVtPjwvaXRlbXM+</cart-content>
> >     </merchant-private-data>
> >   </shopping-cart>
> >  
<buyer-id>818317872099098</buyer-id>
> >   <calculate>
> >     <addresses>
> >       <anonymous-address
id="354914839864565">
> >         <city>New York</city>
> >        
<country-code>US</country-code>
> >         <region>NY</region>
> >        
<postal-code>10014</postal-code>
> >       </anonymous-address>
> >     </addresses>
> >     <shipping>
> >       <method name="USPS Priority Mail
[3]" />
> >       <method name="USPS Express Mail
[6]" />
> >       <method name="Shipping" />
> >     </shipping>
> >     <tax>true</tax>
> >     <merchant-code-strings />
> >   </calculate>
> >  
<buyer-language>en_US</buyer-language>
> > </merchant-calculation-callback>
>
> > My File :googlecheckout_handler.php
>
> > <?php
> >    error_reporting(E_ALL);
> >    include("./cfg/connect.inc.php");
> >   
include("./includes/database/".DBMS.".php&quo
t;);
> >    include("./cfg/language_list.php");
> >   
include("./core_functions/functions.php");
> >   
include("./core_functions/category_functions.php")
;
> >   
include("./core_functions/cart_functions.php");
> >   
include("./core_functions/product_functions.php");

> >   
include("./core_functions/statistic_functions.php"
);
> >   
include("./core_functions/reg_fields_functions.php"
; );
> >   
include("./core_functions/registration_functions.php&qu
ot; );
> >   
include("./core_functions/country_functions.php"
);
> >   
include("./core_functions/zone_functions.php" );
> >   
include("./core_functions/datetime_functions.php"
);
> >   
include("./core_functions/order_status_functions.php&qu
ot; );
> >   
include("./core_functions/order_functions.php" );
> >   
include("./core_functions/aux_pages_functions.php"
);
> >   
include("./core_functions/picture_functions.php"
);
> >   
include("./core_functions/configurator_functions.php&qu
ot; );
> >   
include("./core_functions/option_functions.php"
);
> >   
include("./core_functions/search_function.php" );
> >   
include("./core_functions/discount_functions.php"
);
> >   
include("./core_functions/custgroup_functions.php"
);
> >   
include("./core_functions/shipping_functions.php"
);
> >   
include("./core_functions/payment_functions.php"
);
> >   
include("./core_functions/tax_function.php" );
> >   
include("./core_functions/currency_functions.php"
);
> >   
include("./core_functions/module_function.php" );
> >   
include("./core_functions/crypto/crypto_functions.php&q
uot;);
> >   
include("./core_functions/quick_order_function.php"
; );
> >   
include("./core_functions/setting_functions.php"
);
> >   
include("./core_functions/subscribers_functions.php&quo
t; );
> >   
include("./core_functions/version_function.php"
);
> >   
include("./core_functions/discussion_functions.php"
; );
> >   
include("./core_functions/order_amount_functions.php&qu
ot; );
> >   
include("./core_functions/linkexchange_functions.php&qu
ot; );
> >   
include("./core_functions/affiliate_functions.php"
);
> >    include_once './classes/xml2array.php';
> >    include_once
'./classes/class.virtual.paymentmodule.php';
> >    include_once
'./classes/class.virtual.shippingratecalculator.php';
> >    include_once 'smarty/smarty.class.php';
>
> >    session_start();
>
> >    //connect to the database
> >    db_connect(DB_HOST,DB_USER,DB_PASS) or die
(db_error());
> >    db_select_db(DB_NAME) or die (db_error());
>
> >    settingDefineConstants();
>
> >    if(isset($_GET['success_order'])){
>
> >            cartClearCartContet();
> >           
Redirect(getTransactionResultURL('success'));
> >            die;
> >    }
>
> >    //include current language file
> >    $_SESSION['current_language'] = 0;
> >    if (file_exists('./languages/'.
> >
$lang_list[$_SESSION['current_language']]->filename)) {
>
> >           
include_once('languages/'.$lang_list[$_SESSION['current_lang
uage']]-
>
> > >filename);
>
> >    }
>
> >    list($GoogleCheckout2Info) =
modGetModuleConfigs('googlecheckout2');
> >    $GooglePaymentModule =
> > modGetModuleObj($GoogleCheckout2Info['ConfigID'],
PAYMENT_MODULE);
> >    /* var $GooglePaymentModule GoogleCheckout2
*/
>
> >    $merchant_id = $GooglePaymentModule-
>
> >
>_getSettingValue('CONF_GOOGLECHECKOUT2_MERCHANTID');
>
> >    $merchant_key = $GooglePaymentModule-
>
> >
>_getSettingValue('CONF_GOOGLECHECKOUT2_MERCHANTKEY');
>
> >    $sandbox = $GooglePaymentModule-
>
> >
>_getSettingValue('CONF_GOOGLECHECKOUT2_SANDBOX');
>
> >    $currency =
currGetCurrencyByID($GooglePaymentModule-
>
> >
>_getSettingValue('CONF_GOOGLECHECKOUT2_TRANSCURR'));
>
> >    $headers = getallheaders();
> >    $reqXML = $GLOBALS['HTTP_RAW_POST_DATA'];
>
> >    $AuthOK = false;
>
> >    if(isset($headers['Authorization'])){
>
> >            if(preg_match('/Basics*([^s]*)/msi',
$headers['Authorization'],
> > $subpattern)){
>
> >                    $AuthCode =
base64_decode($subpattern[1]);
> >                    $AuthCode =
explode(':',$AuthCode,2);
>
> >                   
if($AuthCode[0]==$merchant_id&&
isset($AuthCode[1])&& $AuthCode[1]==
> > $merchant_key){
>
> >                            $AuthOK = true;
> >                    }
> >            }
> >    }
>
> >    if(!$AuthOK)die;
>
> >    $Request = new xmlNodeX();
> >    $Request->renderTreeFromInner($reqXML);
>
> >    switch ($Request->getName()){
> >            case 'new-order-notification':
> >                   
$GooglePaymentModule->hndl_NewOrderNotification($Request)
;
> >                    break;
> >            case 'merchant-calculation-callback':
> >                   
$GooglePaymentModule->hndl_MerchantCalculationCallback($R
equest);
> >                    break;
> >            case
'order-state-change-notification':
> >                   
$GooglePaymentModule->hndl_OrderStateChangeNotification($
Request);
> >                    break;
> >    }
>
> > ?>
>
> > Anybody knows how to improve??
>
> --
> --------------------------------------------------
> Bob Hutchinson
> Arwystli Networks
>   Linux specialists
>   Server administration
>   Programming
>   Web Hosting
>   Mail Hosting
> web:http://midwales.com
> email: hu...arwystli.net
> skype: bobhutch
> --------------------------------------------------


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "API Integration Basics" group.
To post to this group, send email to
google-checkout-api-integrationgooglegroups.com
To unsubscribe from this group, send email to
google-checkout-api-integration-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/google-checko
ut-api-integration?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Error parsing XML; message from parser is: The markup in the d
user name
2007-11-05 05:47:51
On Monday 05 November 2007 10:23, infofragrancesky.com wrote:
> Which File Can I Use, Instead of
googlecheckout_handler.php? I have
> bad experiences with PHP CODE.

see

http://code.google.com/apis/checkout/samplecode.html
for a list of available sample code in various languages.

>
> Thanks,
>
> On Nov 3, 3:52 am, Bob Hutchinson <hu...arwystli.net> wrote:
> > On Saturday 03 November 2007 05:04, i...fragrancesky.com wrote:
> > > I found error:
> > > Warnings:
> > > XML We Received:
> > >
> > > <br />
> > > <b>Fatal error</b>:  Call to
undefined function:  getallheaders() in
> > >
<b>/home/fragran2/public_html/googlecheckout_handler.p
hp</b> on line
> > > <b>75</b><br />
> >
> > Use the most recent samplecode, it does not use
function getallheaders()
> >
> > http://google-checkout-php-sample-code.g
ooglecode.com/files/google-ch...
> >
> > > XML We Sent:
> > > <?xml version="1.0"
encoding="UTF-8"?>
> > > <merchant-calculation-callback
xmlns="http://checkout.google.co
m/
> > > schema/2"
serial-number="813e1524-a79a-4689-8f0d-f8040e851f44&quo
t;>
> > >   <shopping-cart>
> > >     <items>
> > >       <item>
> > >         <item-name>English Leather
Spiced Cologne 4 oz Splash</item-
> > > name>
> > >        
<item-description></item-description>
> > >         <unit-price
currency="USD">34.99</unit-price>
> > >         <quantity>2</quantity>
> > >       </item>
> > >     </items>
> > >     <merchant-private-data>
> > >       <order-data>
> > >         <discount-percent />
> > >        
<customer-firstname>-</customer-firstname>
> > >        
<customer-lastname>-</customer-lastname>
> > >        
<customer-email>-</customer-email>
> > >        
<customer-ip>24.199.81.146</customer-ip>
> > >        
<customer-id>238</customer-id>
> > >        
<freight-cost>0.00</freight-cost>
> > >         <affiliate-id />
> > >       </order-data>
> > >       <cart-
> > >
content>PGl0ZW1zPjxpdGVtIGlkPSI2ODEiPjxwcm9kdWN0IGlkPSI2N
jg5IiBmcmVlLXN
> > >oaXB waW5nPSIwIj48L3Byb2R1Y3Q
> > >
+PHF1YW50aXR5PjwhW0NEQVRBWzJdXT48L3F1YW50aXR5Pjx2YXJpYW50cz4
8L3Zhcmlhbn
> > >RzPj
xwcmljZSBjdXJyZW5jeT0iIj48IVtDREFUQVszNC45OV1dPjwvcHJpY2U
> > > +PC9pdGVtPjwvaXRlbXM+</cart-content>
> > >     </merchant-private-data>
> > >   </shopping-cart>
> > >  
<buyer-id>818317872099098</buyer-id>
> > >   <calculate>
> > >     <addresses>
> > >       <anonymous-address
id="354914839864565">
> > >         <city>New York</city>
> > >        
<country-code>US</country-code>
> > >         <region>NY</region>
> > >        
<postal-code>10014</postal-code>
> > >       </anonymous-address>
> > >     </addresses>
> > >     <shipping>
> > >       <method name="USPS Priority
Mail [3]" />
> > >       <method name="USPS Express Mail
[6]" />
> > >       <method name="Shipping"
/>
> > >     </shipping>
> > >     <tax>true</tax>
> > >     <merchant-code-strings />
> > >   </calculate>
> > >  
<buyer-language>en_US</buyer-language>
> > > </merchant-calculation-callback>
> > >
> > > My File :googlecheckout_handler.php
> > >
> > > <?php
> > >    error_reporting(E_ALL);
> > >   
include("./cfg/connect.inc.php");
> > >   
include("./includes/database/".DBMS.".php&quo
t;);
> > >   
include("./cfg/language_list.php");
> > >   
include("./core_functions/functions.php");
> > >   
include("./core_functions/category_functions.php")
;
> > >   
include("./core_functions/cart_functions.php");
> > >   
include("./core_functions/product_functions.php");

> > >   
include("./core_functions/statistic_functions.php"
);
> > >   
include("./core_functions/reg_fields_functions.php"
; );
> > >   
include("./core_functions/registration_functions.php&qu
ot; );
> > >   
include("./core_functions/country_functions.php"
);
> > >   
include("./core_functions/zone_functions.php" );
> > >   
include("./core_functions/datetime_functions.php"
);
> > >   
include("./core_functions/order_status_functions.php&qu
ot; );
> > >   
include("./core_functions/order_functions.php" );
> > >   
include("./core_functions/aux_pages_functions.php"
);
> > >   
include("./core_functions/picture_functions.php"
);
> > >   
include("./core_functions/configurator_functions.php&qu
ot; );
> > >   
include("./core_functions/option_functions.php"
);
> > >   
include("./core_functions/search_function.php" );
> > >   
include("./core_functions/discount_functions.php"
);
> > >   
include("./core_functions/custgroup_functions.php"
);
> > >   
include("./core_functions/shipping_functions.php"
);
> > >   
include("./core_functions/payment_functions.php"
);
> > >   
include("./core_functions/tax_function.php" );
> > >   
include("./core_functions/currency_functions.php"
);
> > >   
include("./core_functions/module_function.php" );
> > >   
include("./core_functions/crypto/crypto_functions.php&q
uot;);
> > >   
include("./core_functions/quick_order_function.php"
; );
> > >   
include("./core_functions/setting_functions.php"
);
> > >   
include("./core_functions/subscribers_functions.php&quo
t; );
> > >   
include("./core_functions/version_function.php"
);
> > >   
include("./core_functions/discussion_functions.php"
; );
> > >   
include("./core_functions/order_amount_functions.php&qu
ot; );
> > >   
include("./core_functions/linkexchange_functions.php&qu
ot; );
> > >   
include("./core_functions/affiliate_functions.php"
);
> > >    include_once './classes/xml2array.php';
> > >    include_once
'./classes/class.virtual.paymentmodule.php';
> > >    include_once
'./classes/class.virtual.shippingratecalculator.php';
> > >    include_once 'smarty/smarty.class.php';
> > >
> > >    session_start();
> > >
> > >    //connect to the database
> > >    db_connect(DB_HOST,DB_USER,DB_PASS) or die
(db_error());
> > >    db_select_db(DB_NAME) or die
(db_error());
> > >
> > >    settingDefineConstants();
> > >
> > >    if(isset($_GET['success_order'])){
> > >
> > >            cartClearCartContet();
> > >           
Redirect(getTransactionResultURL('success'));
> > >            die;
> > >    }
> > >
> > >    //include current language file
> > >    $_SESSION['current_language'] = 0;
> > >    if (file_exists('./languages/'.
> > >
$lang_list[$_SESSION['current_language']]->filename)) {
> > >
> > >           
> > >
include_once('languages/'.$lang_list[$_SESSION['current_lang
uage']]-
> > >
> > > >filename);
> > >
> > >    }
> > >
> > >    list($GoogleCheckout2Info) =
modGetModuleConfigs('googlecheckout2');
> > >    $GooglePaymentModule =
> > >
modGetModuleObj($GoogleCheckout2Info['ConfigID'],
PAYMENT_MODULE);
> > >    /* var $GooglePaymentModule GoogleCheckout2
*/
> > >
> > >    $merchant_id = $GooglePaymentModule-
> > >
> > >
>_getSettingValue('CONF_GOOGLECHECKOUT2_MERCHANTID');
> > >
> > >    $merchant_key = $GooglePaymentModule-
> > >
> > >
>_getSettingValue('CONF_GOOGLECHECKOUT2_MERCHANTKEY');
> > >
> > >    $sandbox = $GooglePaymentModule-
> > >
> > >
>_getSettingValue('CONF_GOOGLECHECKOUT2_SANDBOX');
> > >
> > >    $currency =
currGetCurrencyByID($GooglePaymentModule-
> > >
> > >
>_getSettingValue('CONF_GOOGLECHECKOUT2_TRANSCURR'));
> > >
> > >    $headers = getallheaders();
> > >    $reqXML = $GLOBALS['HTTP_RAW_POST_DATA'];
> > >
> > >    $AuthOK = false;
> > >
> > >    if(isset($headers['Authorization'])){
> > >
> > >           
if(preg_match('/Basics*([^s]*)/msi',
> > > $headers['Authorization'], $subpattern)){
> > >
> > >                    $AuthCode =
base64_decode($subpattern[1]);
> > >                    $AuthCode =
explode(':',$AuthCode,2);
> > >
> > >                   
if($AuthCode[0]==$merchant_id&&
> > > isset($AuthCode[1])&& $AuthCode[1]==
$merchant_key){
> > >
> > >                            $AuthOK = true;
> > >                    }
> > >            }
> > >    }
> > >
> > >    if(!$AuthOK)die;
> > >
> > >    $Request = new xmlNodeX();
> > >   
$Request->renderTreeFromInner($reqXML);
> > >
> > >    switch ($Request->getName()){
> > >            case 'new-order-notification':
> > >                   
> > >
$GooglePaymentModule->hndl_NewOrderNotification($Request)
; break;
> > >            case
'merchant-calculation-callback':
> > >                   
> > >
$GooglePaymentModule->hndl_MerchantCalculationCallback($R
equest);
> > > break;
> > >            case
'order-state-change-notification':
> > >                   
> > >
$GooglePaymentModule->hndl_OrderStateChangeNotification($
Request);
> > > break;
> > >    }
> > >
> > > ?>
> > >
> > > Anybody knows how to improve??
> >
> > --
> >
--------------------------------------------------
> > Bob Hutchinson
> > Arwystli Networks
> >   Linux specialists
> >   Server administration
> >   Programming
> >   Web Hosting
> >   Mail Hosting
> > web:http://midwales.com
> > email: hu...arwystli.net
> > skype: bobhutch
> >
--------------------------------------------------
>
> 
-- 
--------------------------------------------------
Bob Hutchinson
Arwystli Networks
  Linux specialists
  Server administration
  Programming
  Web Hosting
  Mail Hosting
web: http://midwales.com
email: hutcharwystli.net
skype: bobhutch
--------------------------------------------------

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "API Integration Basics" group.
To post to this group, send email to
google-checkout-api-integrationgooglegroups.com
To unsubscribe from this group, send email to
google-checkout-api-integration-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/google-checko
ut-api-integration?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )