Google Checkout integrates using Google Checkout notifications in Wordpress ecommerce Plugin.

1.

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).

2.

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.

3.

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 (</form>) add line:

<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/notifysale.php" type="text/javascript"></script>

4.

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 */

5.

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.