Google Checkout is more than a payment method. It replaces the entire checkout process, allowing your customer to checkout entirely through Google. If you aren't familiar with how it works, you should first review the information on Google Checkout's tour page:
https://checkout.google.com/buyer/tour.html
This is a walkthrough of what the ordering process is like for your customers when they checkout with Google Checkout in your Squirrelcart store.
- Add to Cart
Your customers shop on your site as they normally would, adding items to their cart. They then click Squirrelcart's
button to see their cart.

- Your customer can decide between checking out on your website via the Checkout button, or via Google Checkout. When the customer clicks Google Checkout, they are taken to Google. If they are not logged in, they will see a page like this:
-
-
The customer then clicks the Place your order now button, and the order is complete:

Click to enlarge
A link to continue shopping appears at the bottom of this page, which will take the customer back to your main storefront page if clicked. The customer will not see a receipt on your site, because they chose to checkout using Google instead of your site.
While Google Checkout may appear very simple to your customers, there is quite a bit going on behind the scenes. It's important for you to understand what's happening so you can properly configure Squirrelcart for use with Google Checkout. The information below will explain what happens during checkout that your customer can't see.
- Generate Google Cart
When the customer clicks the
button, Squirrelcart generates the information necessary to send the cart to Google Checkout. This includes the items in the cart, default shipping rates, tax tables to calculate taxes, etc. This information is stored in the code for the Google Checkout button (see step #1 above).
- Merchant Calculation Callback
When the customer clicks the Google Checkout button, if at least one shiping method was enabled for use with Google Checkout, Google will send a callback request to your Squirrelcart installation. The purpose of this callback is to obtain shipping rates to display in the Shipping and Handling field (see step #3 above). Squirrelcart will use the address information provided by Google in the callback to determine what shipping rates to offer, and passes them back to Google. To maintain a fast checkout process, Google will time out the request after 3 seconds. If a timeout occurs, the default shipping rates sent when the Google Checkout button was clicked will be used.
- Merchant Notification
When the customer clicks the Place your order now button, Google completes the order and sends a new order notification to Squirrelcart. Squirrelcart takes the information from the notification and adds the order to your database. When the state of the order changes, Google sends an order state change notification to Squirrelcart. Squirrelcart uses this to update the Google specific fields on the order in Squirrelcart's datbase.
- SSL certificate - this is required for the callbacks explained in "Behind the Scenes" above
- Expat PHP extension
Enabling Google Checkout
- If you haven't already done so, signup for Google Checkout at this URL:
https://checkout.google.com/sell/signup
- Login to Google Checkout, and click the Settings tab.
- Click the Integration link in the left navigation
- In the Account Information section, you will see your Google merchant ID and merchant key. Write both of them down.
- Under Shopping cart post security, check the field before "My company will only post digitally signed carts" if that field is not already checked.
- In the API callback URL field, enter the secure URL to the "google_checkout_notifications.php" file inside your squirrelcart folder.
Example: https://www.example.com/squirrelcart/google_checkout_notifications.php
Per Google Checkout's requirements, this URL must be a secure URL.
- Under Callback method, select XML
- Click the Save Settings button
- In Squirrelcart's control panel, click the Settings > Payment > Methods menu link
- Click the record row labeled Google Checkout
- Enter your Google Checkout merchant ID in the Merchant ID field
- Enter your Google Checkout merchant key in the Merchant Key field
- If you registered for a live Google Checkout account, make sure the Mode field is set to Live.
- Google recommends that you do not send order emails to customers because they will already receive one from Google. If you wish to take their recommendation, you can disable the order email normally sent to customers by checking the Disable Order Email field. This will not affect emails to the merchant, or to customers ordering by other payment methods.
- Choose your button size and style using the Button Size and Button Style fields. Use this page to see the buttons:
http://checkout.google.com/seller/checkout_buttons.html
- If you are using Google Checkout in the US, set the Currency Code field to USD. If you are using Google Checkout for the UK, set the Currency Code field to GBP.
- Check the Enabled field and click
- If you have an older customized version of the view_cart_item.tpl.php template file, you will need to add a variable to it. If you have never modified this file then you can skip this.
- Open your custom version of the view_cart.tpl.php file in an editor.
- Add this line to the very bottom of the file if it is not already there:
<?=$Google_Checkout_Form?>
- Save the file.
Shipping - Enabling Shipping Methods and Default Prices
If you haven't already done so, read the Behind the Scenes section above. You must enable each shipping method that you would like to use for Google Checkout as follows:
- Open the Shipping Methods table in Squirrelcart's control panel
- Click on a record row for a shipping method you would like to make available to Google Checkout
- Check the Use with Google Checkout field
- If the merchant callback fails, Google needs to know what to charge by default for each payment method. Enter that amount using the Default Price field. Because Google only waits for 3 seconds before timing out and using the defaults, it's very important that you specify a default price. Leaving it blank will be equivalent to defaulting to free shipping for this method.
- Click
- Repeat steps for other shipping methods as needed
Shipping - Preventing Merchant Callback Failure
3 seconds is unfortunately not always enough time to retrieve shipping rates, and it is possible that Google's merchant callback will timeout causing your default prices to be used. To give Squirrelcart the best chance of responding in 3 seconds, follow these recommendations:
- Enable as few shipping methods as possible
- Disable real time rates
Real time shipping rates work by making requests to couriers' websites to obtain shipping rates. These requests will add considerably to the amount of time it takes Squirrelcart to respond and will definitely increase the chance of a timeout. You can disable real time rates on a per courier basis for Google Checkout, while still leaving them enabled for customers that use Squirrelcart's checkout. To do this, check the Disable RTR for Google Checkout on the shipping courier's record.
Squirrelcart provides the ability via Shipping Rules to offer shipping rates based on customer account information. Because Google Checkout is taking over the checkout process, the customer will not have an account in Squirrelcart. Because of this, Shipping Rules that are based on customer account information will not take effect. The same applies for discounts.
Because Google does not allow you to ask for any address information from the customer before displaying the Google Checkout button, the Force User Creation setting in Squirrelcart will be disabled.
The sales tax feature in Squirrelcart works with Google Checkout. The tax records you specify are sent to Google when the customer clicks the Google Checkout button. Because of the way Google Checkout is setup, Squirrelcart's Tax on Handling field on your Sales Tax records will not function. If you wish to charge tax on handling, you will need to enter a value in the Tax on Shipping field. If you do enter a value for Tax on Shipping, it must match the value you've entered in the Tax on Products field.
Callback failure
Google Checkout makes a callback to Squirrelcart to obtain shipping rates, and another one to notify that the order is complete. These both rely on the server supporting PHP authentication via the $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] variables. These variables are not available when PHP is running via CGI (instead of as an Apache Module), and authentication will fail causing the callbacks to exit.
The result of this is that shipping calculations will always fail, and order notifications from Google Checkout will not be received.
If you believe you are having this problem, rename the squirrelcart/google_checkout.htaccess file to squirrelcart/.htaccess, which may resolve the problem. That file will set the variables needed for HTTP authentication. We recommend not doing this unless you are sure you have this problem.
Google Checkout offers a separate sandbox test environment that is identical to it's production environment. The regular Google Checkout URL is:
http://checkout.google.com
The URL for the sandbox environment is:
http://sandbox.google.com
For more information on Google Checkout's sandbox see this page:
http://code.google.com/apis/checkout/developer/index.html#integration_overview
If you wish to use a sandbox account for testing Google Checkout in Squirrelcart, simply change the Mode field on Google Checkout's payment method record from Live to Test (Google Sandbox)
© 2001-2017 Lighthouse Development. All Rights Reserved.