Zen Cart Logo
Forums / Addon Payment Modules / Google Checkout module for ZC 1.3.x (beta)

Google Checkout module for ZC 1.3.x (beta)

Locked

Views: 1,099,598

Results 501 to 520 of 3,921
This thread is locked. New replies are disabled.
04 Jan 2007, 20:06
#502
ropu avatar

ropu

Zen Follower

Join Date:
Oct 2006
Location:
argentina
Posts:
243
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

michelle_rvc:

Hi,

I've attached the added_function_for_google_checkout that I as using. Maybe that would help?

the file is the correct one. but still i cant find where the error is.

could you provide some more info on the error? how, step by step, to reproduce it, full error response, etc

ropu

04 Jan 2007, 20:22
#503
regenbauma avatar

regenbauma

New Zenner

Join Date:
Jul 2006
Posts:
40
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

I have been getting thsi error message in my google callback error page ........

 **Your server returned no data in its response; Checkout requires data of type merchant-calculation-results in response to merchant-calculation-callback

**

what google sends to me is --------------

<?xml version="1.0" encoding="UTF-8"?> <merchant-calculation-callback xmlns="http://checkout.google.com/schema/2" serial-number="16439351-4dd7-4453-828b-c655a76e1f0d"> <shopping-cart> <merchant-private-data>
  <session-data>4869fb81b0ddd4fcc902e497e4764d0;zenid</session-data>
  
  
  <product-data>;147</product-data>
  
  
  <ip-address>68.zzz.yyy.xxx</ip-address>
  

</merchant-private-data>
<items>
  <item>
    <quantity>1</quantity>
    <unit-price currency="USD">299.95</unit-price>
    <item-name>20619 - 7pc Classic Set w/free 8&quot; frypan &amp; free Stack &amp; Steam</item-name>
    <item-description></item-description>
    <tax-table-selector></tax-table-selector>
  </item>
</items>
</shopping-cart> <buyer-id>12234563</buyer-id> <calculate> <addresses> <anonymous-address id="1112234549972"> <country-code>US</country-code> <city>Carmel</city> <region>IN</region> <postal-code>46033</postal-code> </anonymous-address> </addresses> <merchant-code-strings /> <tax>false</tax> <shipping> <method name="Table: Table Rate (vary by weight/price)" /> <method name="UPS: Next Day Air Early AM" /> <method name="UPS: Next Day Air Early AM Letter" /> <method name="UPS: Worldwide Expedited" /> </shipping> </calculate> <buyer-language>en_US</buyer-language> </merchant-calculation-callback>

=======================
I see that this arrives in response_message.log but seems that respondhandler is not responding to it ......

does anyone else see this ..... any clues are helpful ..... thanks

04 Jan 2007, 20:54
#504
michelle_rvc avatar

michelle_rvc

New Zenner

Join Date:
May 2006
Posts:
31
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

ropu:

the file is the correct one. but still i cant find where the error is.

could you provide some more info on the error? how, step by step, to reproduce it, full error response, etc

ropu
This is what google sandbox tells me when I place an order.

Error: Error parsing XML; message from parser is: Unexpected element (div) encountered: div
Warnings: The namespace of all API requests and postings should be "http://checkout.google.com/schema/2", but this document has: "". Try <div xmlns="http://checkout.google.com/schema/2" ...> for your root element.

XML We Received: <div class="systemError">1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1<br />in:<br />[select products_id, products_weight from products p where products_id in ()]<br /></div>

XML We Sent: <?xml version="1.0" encoding="UTF-8"?>
<merchant-calculation-callback xmlns="http://checkout.google.com/schema/2" serial-number="a8eb5f94-641d-4190-81cc-cb0feaf8c5f9">
<shopping-cart>
<merchant-private-data>

  <session-data>f8ea59fda244b925edf63b1a7a885d69;zenid</session-data>
  
  
  <product-data>;83;45</product-data>
  
  
  <ip-address>69.128.165.201</ip-address>
  

</merchant-private-data>
<items>
  <item>
    <quantity>5</quantity>
    <unit-price currency="USD">3.99</unit-price>
    <item-name>Robert Kaufman Kona White 42&quot;-45&quot;</item-name>
    <item-description></item-description>
    <tax-table-selector></tax-table-selector>
  </item>
  <item>
    <quantity>2</quantity>
    <unit-price currency="USD">7.49</unit-price>
    <item-name>Large Flying Geese</item-name>
    <item-description></item-description>
    <tax-table-selector></tax-table-selector>
  </item>
</items>
</shopping-cart> <buyer-id>326975014161047</buyer-id> <calculate> <addresses> <anonymous-address id="924377622528329"> <country-code>US</country-code> <city>Salisbury</city> <region>NH</region> <postal-code>03268</postal-code> </anonymous-address> </addresses> <merchant-code-strings /> <tax>false</tax> <shipping> <method name="UPS: Next Day Air Early AM" /> <method name="UPS: Next Day Air Early AM Letter" /> <method name="UPS: Worldwide Expedited" /> <method name="USPS: Express Mail" /> <method name="USPS: First-Class Mail" /> <method name="USPS: Priority Mail" /> <method name="USPS: Parcel Post" /> <method name="USPS: Bound Printed Material" /> <method name="USPS: Library" /> </shipping> </calculate> <buyer-language>en_US</buyer-language> </merchant-calculation-callback>
05 Jan 2007, 00:30
#505
dhan99 avatar

dhan99

New Zenner

Join Date:
Dec 2006
Posts:
20
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

michelle_rvc:

This is what google sandbox tells me when I place an order.

Error: Error parsing XML; message from parser is: Unexpected element (div) encountered: div
Warnings: The namespace of all API requests and postings should be "http://checkout.google.com/schema/2", but this document has: "". Try <div xmlns="http://checkout.google.com/schema/2" ...> for your root element.

XML We Received: <div class="systemError">1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1<br />in:<br />[select products_id, products_weight from products p where products_id in ()]<br /></div>

XML We Sent: <?xml version="1.0" encoding="UTF-8"?>
<merchant-calculation-callback xmlns="http://checkout.google.com/schema/2" serial-number="a8eb5f94-641d-4190-81cc-cb0feaf8c5f9">
<shopping-cart>
<merchant-private-data>

  <session-data>f8ea59fda244b925edf63b1a7a885d69;zenid</session-data>
  
  
  <product-data>;83;45</product-data>
  
  
  <ip-address>69.128.165.201</ip-address>
  

</merchant-private-data>
<items>
  <item>
    <quantity>5</quantity>
    <unit-price currency="USD">3.99</unit-price>
    <item-name>Robert Kaufman Kona White 42&quot;-45&quot;</item-name>
    <item-description></item-description>
    <tax-table-selector></tax-table-selector>
  </item>
  <item>
    <quantity>2</quantity>
    <unit-price currency="USD">7.49</unit-price>
    <item-name>Large Flying Geese</item-name>
    <item-description></item-description>
    <tax-table-selector></tax-table-selector>
  </item>
</items>
</shopping-cart> <buyer-id>326975014161047</buyer-id> <calculate> <addresses> <anonymous-address id="924377622528329"> <country-code>US</country-code> <city>Salisbury</city> <region>NH</region> <postal-code>03268</postal-code> </anonymous-address> </addresses> <merchant-code-strings /> <tax>false</tax> <shipping> <method name="UPS: Next Day Air Early AM" /> <method name="UPS: Next Day Air Early AM Letter" /> <method name="UPS: Worldwide Expedited" /> <method name="USPS: Express Mail" /> <method name="USPS: First-Class Mail" /> <method name="USPS: Priority Mail" /> <method name="USPS: Parcel Post" /> <method name="USPS: Bound Printed Material" /> <method name="USPS: Library" /> </shipping> </calculate> <buyer-language>en_US</buyer-language> </merchant-calculation-callback>

I wonder which version of responsehandler.php are you using? I got very similar errors when I used the file from GldRush98 and I found the reason that I explained in post #472
(the calculation of $total_weight depends on the merchant-item-id tag which simply does not exist in the actual XML, even though it is mentioned in Google API document.)

I don't know if you may have had the same problem.

05 Jan 2007, 00:50
#506
michelle_rvc avatar

michelle_rvc

New Zenner

Join Date:
May 2006
Posts:
31
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

dhan99:

I wonder which version of responsehandler.php are you using? I got very similar errors when I used the file from GldRush98 and I found the reason that I explained in post #472
(the calculation of $total_weight depends on the merchant-item-id tag which simply does not exist in the actual XML, even though it is mentioned in Google API document.)

I don't know if you may have had the same problem.

Yes, I am using the file from GldRush98 and the updated gco105_zc137 files. When I use any other responsehandler I get the error that I don't ship to that address.

05 Jan 2007, 02:50
#507
dhan99 avatar

dhan99

New Zenner

Join Date:
Dec 2006
Posts:
20
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

michelle_rvc:

Yes, I am using the file from GldRush98 and the updated gco105_zc137 files. When I use any other responsehandler I get the error that I don't ship to that address.

That address they wouldn't allow you to ship to, is it a US address or a foreign address? I got that "don't ship to that address" error every single time if my ship-to address is non-US. But for US addresses I'm fine (with gco105_zc137 and nothing else).

05 Jan 2007, 04:32
#508
kebeid avatar

kebeid

New Zenner

Join Date:
Mar 2006
Posts:
66
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Is anyone getting this error in the admin side:

Warning: Invalid argument supplied for foreach() in /admin/includes/functions/extra_functions/added_function_for_google_checkout.php on line 267

saying somethings wrong with the foreach() - it looks good to me.

05 Jan 2007, 07:23
#509
bbg avatar

bbg

New Zenner

Join Date:
Dec 2006
Posts:
13
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

michelle_rvc:

This is what google sandbox tells me when I place an order.

Error: Error parsing XML; message from parser is: Unexpected element (div) encountered: div
Warnings: The namespace of all API requests and postings should be "http://checkout.google.com/schema/2", but this document has: "". Try <div xmlns="http://checkout.google.com/schema/2" ...> for your root element.

XML We Received: <div class="systemError">1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1<br />in:<br />[select products_id, products_weight from products p where products_id in ()]<br /></div>

The problem you're encountering is shown in the "XML We Received" part:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
in:
[select products_id, products_weight from products p where products_id in ()]

This SQL string is coming from GldRush98's responsehandler.php line 393:

$item_weights_result = $db->Execute("select products_id, products_weight from " . TABLE_PRODUCTS . " p where products_id in (" . $item_id_list . ")");
```Prior to line 393, the code is supposed to populate the $item_id_list variable with a list of products id from the merchant-item-id value in the XML- **which as dhan99 mentioned a couple posts back, doesn't exist.**   So $item_id_list just returns nothing (which is why there is nothing in between the parenthesis at the end of the SQL string), which causes your SQL error.

I'm not using GldRush98's responsehandler.php, but perhaps someone else who is using it can help you out.

Shawn
05 Jan 2007, 07:27
#510
jefflam avatar

jefflam

New Zenner

Join Date:
Dec 2006
Posts:
10
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Hi everyone,

I could not get google checkout payment module 1.0.4 option in my 1.3.7 zencart"s admin-modules-payments. I did follow all the instructions but failed again and again.

Please give me a hand/hint. Thanks alot.

05 Jan 2007, 07:41
#511
bbg avatar

bbg

New Zenner

Join Date:
Dec 2006
Posts:
13
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

kebeid:

Is anyone getting this error in the admin side:

Warning: Invalid argument supplied for foreach() in /admin/includes/functions/extra_functions/added_function_for_google_checkout.php on line 267

saying somethings wrong with the foreach() - it looks good to me.

As you know, that particular line contains:

foreach($googlepayment->mc_shipping_methods[$select_array[$i]['code']]['domestic_types'] as $method => $method_name) {
```I'd suggest checking the **mc_shipping_methods** array (starting at line 66 in original GCO 1.0.5) in ***includes/modules/payment/googlecheckout.php*** to make sure they're all valid arrays.  If you modified them (such as to add/remove shipping methods), it's possible you may have missed a closing parenthesis, a comma or something small like that.

Shawn
05 Jan 2007, 16:27
#512
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Jefflam:

Hi everyone,

I could not get google checkout payment module 1.0.4 option in my 1.3.7 zencart"s admin-modules-payments. I did follow all the instructions but failed again and again.

Please give me a hand/hint. Thanks alot.

Give US a hint -

How far did you get? What are you seeing? Or not seeing?

05 Jan 2007, 16:57
#513
kebeid avatar

kebeid

New Zenner

Join Date:
Mar 2006
Posts:
66
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

BBG:

As you know, that particular line contains:

foreach($googlepayment->mc_shipping_methods[$select_array[$i]['code']]['domestic_types'] as $method => $method_name) {

> 
> Shawn

But I didn't modify them I just got it from GCO 1.0.5 and installed. Is that b/c I don't have MZMT in the array, could that be the source of the problem?

Pete
05 Jan 2007, 18:44
#514
bbg avatar

bbg

New Zenner

Join Date:
Dec 2006
Posts:
13
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

kebeid:

But I didn't modify them I just got it from GCO 1.0.5 and installed. Is that b/c I don't have MZMT in the array, could that be the source of the problem?

Pete

It's possible it could be related to specific shipping options you've chosen. I haven't run into your particular error, however, I've only tried to get GCO to work with USPS shipping. So, I guess my next suggestion would be to experiment by removing all the other shipping methods except for Flat Rate (or some shipping method not MZMT) and see if your foreach error goes away. If you haven't done so already, try searching the forum for "foreach", I believe someone else mentioned a foreach error a while back.

I'm kind of swinging in the dark here, so perhaps someone more knowledgeable or someone who has run into this error before can chime in.

Good luck,
Shawn

05 Jan 2007, 19:05
#515
jefflam avatar

jefflam

New Zenner

Join Date:
Dec 2006
Posts:
10
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Jefflam:

Hi everyone,

I could not get google checkout payment module 1.0.4 option in my 1.3.7 zencart"s admin-modules-payments. I did follow all the instructions but failed again and again.

Please give me a hand/hint. Thanks alot.

this issue was solved with the BBG's help. thanks alot to BBG.

05 Jan 2007, 20:18
#516
kebeid avatar

kebeid

New Zenner

Join Date:
Mar 2006
Posts:
66
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Shawn, thanks for your suggestions.
I'm noticing that I get this particular error only when I edit the GCO payment mod in the admin. So I commented that out, but I'm getting the same error from gcheckout on the cart side. I'm also noticing some errors from google when I go into my account so I'll look at that.

05 Jan 2007, 22:15
#517
gdorn avatar

gdorn

New Zenner

Join Date:
Jan 2004
Posts:
46
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

One suggested change:

Zencart stores the order total in two places - the orders_total table, and in the orders table in the field order_total. The responsehandler.php file updates the orders_total table just fine, but misses the second place. This make some third-party code (such as super orders) that relies on the order_total field to break.

The fix is in responsehandler.php:

Find the section that looks like:

'ip_address' => $data[$root]['shopping-cart']['merchant-private-data']['ip-address'],
'cc_type' => '',
'cc_owner' => '',
'cc_number' => '',
'cc_expires' => '',
'date_purchased' => 'now()',
'orders_status' => 1,
'currency' => "USD",
'currency_value' => 1);

Just after the 'currency' => "USD", line, add the following line:

'order_total' => $data[$root]['order-total'],

Then check that your change didn't break anything by going to http://<yoursitehere>/googlecheckout/responsehandler.php, like in the google checkout instructions.

06 Jan 2007, 05:05
#518
jefflam avatar

jefflam

New Zenner

Join Date:
Dec 2006
Posts:
10
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Hi everyone,
ZC 137 + GCO 105
2 problems
(1) Google checkout icon does not appear on the shopping cart page, but shown on login page. after finished login page, ZC checkout to step 2 and there is no payment options there.
(2) PP express checkout added, GCO disappeared

thank you for any hints and points.

jeff

http://fastener-outlet.com

06 Jan 2007, 16:31
#519
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Jefflam:

Hi everyone,
ZC 137 + GCO 105
2 problems
(1) Google checkout icon does not appear on the shopping cart page, but shown on login page. after finished login page, ZC checkout to step 2 and there is no payment options there.
(2) PP express checkout added, GCO disappeared

thank you for any hints and points.

jeff

http://fastener-outlet.com

Have you merged the PayPal Express code with the GCO code on the three template files that GCO uses?

See posts 490, 491.

Check that sort order is different for PayPal Express and GCO in Payment Module setup.

07 Jan 2007, 01:31
#520
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

Jefflam:

ZC checkout to step 2 and there is no payment options there.

And after following chain_man's recommends, keep in mind that both Google Checkout and the new PayPal Express Checkout are not standard Zen Cart checkout procedures.

So you will not see either of the two Express Checkout options listed on the "Step 2 - Select Payment Method" page.

But the step 2 page will continue to display standard PayPal IPN payment method (unless you disabled) which completely integrates into Zen Cart's standard checkout process.

  • Woody