Skip Navigation LinksPayCircuit Home > Google Checkout Cookbook > Custom Calculations With Javascript
Bookmark and Share

Google Checkout Shopping Cart: Custom Shipping Calculations Sample

Source code and reference provided below.

PayCircuit T-shirt
Price: $29.99
Color: Black
Brand: Paycircuit
Description The best shirt ever
Your notes:
PayCircuit Coffee Mug
Price: $5.99
Text to print on mug:

Source/Reference

JavaScript

This should be in <head> of your HTML file, or you can create a .js file and reference it for easier management.

This code:

HTML

This sample should be within your <body>. Note that this makes use of the Google Checkout Shopping Cart (v. 2_2).

When done testing you must modify the following for this to work:

  1. Provide your own Merchant ID (replace the mid=000000000000000 with your own merchant ID)
  2. post-cart-to-sandbox="true" is for Sandbox testing
  3. post-cart-to-sandbox="false" for production/live use
  4. See JavaScript comments above to set return true;
  5. See Javascript comments above to comment or delete alert(....) as this is only for testing purposes
© 2012 PayCircuit. All Rights Reserved.