Google Checkout (in WordPress ecommerce Plugin) integration
Google Checkout integrates using Google Checkout notifications in WordPress ecommerce Plugin.
Setting up your Google Checkout merchant account
Log in to your Google Checkout merchant account. Go to Settings panel. Now select Integration from left menu. If it is checked, uncheck “My company will only post digitally signed carts.“. Next you must insert URL https://URL_TO_PostAffiliatePro/plugins/GoogleCheckout/googlecheckout.php into “API callback URL:” textbox. Last thing, is to select XML radio button from “Callback method:” group. Do not forget to save your settings.
Notice: URL https://URL_TO_PostAffiliatePro/plugins/GoogleCheckout/googlecheckout.php must be on secure domain (More on Google documentation).
Activate and configure Google Checkout plugin
Right after you activate Google Checkout plugin, you need to setup it.Login to your merchant panel. Go to menu Start >Plugins. Now click Configure button in Google Checkout plugin item. Here you must set your Merchant ID and Merchant Key. These can be found in your Google checkout merchant account in Settings >Integration menu. Leave Custom value separator empty.
Edit file
Find and edit file ‘shopping_cart_page.php‘ in directory:
/wp-content/plugins/wp-e-commerce/themes/yourthemefolder/
or file ‘wpsc-shopping_cart_page.php‘ in directory:
/wp-content/themes/yourthemefolder/
Find line (about 372):
<input type='submit' value='<?php echo __('Make Purchase', 'wpsc');?>' name='submit' class='make_purchase' />
Right above this line add:
<input name='pap-merchant-private-data' id='pap_dx8vc2s5' type='hidden' value='' />
and below next end form tag () add line:
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/notifysale.php" type="text/javascript"></script>
Edit file
Find and edit file ‘ajax.functions.php‘ in directory
/wp-content/plugins/wp-e-commerce/wpsc-includes/
Find line (about 724):
header('Location: '.get_option('shopping_cart_url'));
Right above this line add:
/* Post affiliate pro integration /
if(!isset($_REQUEST['pap-merchant-private-data'])){
$_REQUEST['merchant-private-data'] = '';
}
$_SESSION['pap-merchant-private-data'] = $_REQUEST['pap-merchant-private-data'];
/ Post affiliate pro integration end */
Edit file
Find and edit file ‘GoogleCheckout-XML.php‘ in directory:
/wp-content/plugins/wp-e-commerce/merchants/
a) Find line (about 88):
$cart = new GoogleCart($merchant_id, $merchant_key, $server_type, $currency);
Right below this line add:
/* Post affiliate pro integration /
if (isset($_SESSION['pap-merchant-private-data'])) {
$cart->SetMerchantPrivateData($_SESSION['pap-merchant-private-data']);
}
/ Post affiliate pro integration end*/
b) Next, find line:
$cart->AddItem($cartitem["$no"]);
Right above this line add:
/* Post affiliate pro integration /
if (isset($_SESSION['pap-merchant-private-data'])) {
$cartitem["$no"]->SetMerchantPrivateItemData($_SESSION['pap-merchant-private-data']);
}
/ Post affiliate pro integration end */
c) Next, find line:
$cart->AddItem($cartitem[$no]);
Right above this line add:
/* Post affiliate pro integration */
if (isset($_SESSION['pap-merchant-private-data'])) {
$cartitem[$no]->SetMerchantPrivateItemData($_SESSION['pap-merchant-private-data']);
}
/* Post affiliate pro integration end*/
Steps b) and c) are not necessary if you process the cart as a whole transaction.
Every Google Checkout user should contact Google checkout team at checkout-api-support@google.com and request to whitelist their domain. Otherwise the tracking will not work.

Discover Post Affiliate Pro's flexible pricing plans tailored to fit your business needs, with options for Pro, Ultimate, and Network packages. Enjoy a free trial with no credit card required, no setup fees, and the freedom to cancel anytime. Benefit from features like unlimited affiliates, advanced reporting, customizable interfaces, and lifetime support. Save up to 20% with annual billing and take advantage of more than 220 integrations. Perfect for businesses seeking to enhance their affiliate marketing efforts. Visit now to find the ideal plan for you!
Discover the essentials of clicks (referrals) tracking with our comprehensive guide. Learn about the importance of click tracking code, explore various code examples including simple, asynchronous, and PHP versions, and dive into advanced tracking options. Optimize your affiliate marketing strategy with expert tips on setting account IDs, managing cookies, and customizing tracking parameters. Visit now to enhance your click tracking implementation!