Google Checkout (in WordPress ecommerce Plugin)

Integrate Google Checkout with WordPress ecommerce using detailed steps: set up your merchant account, configure the plugin, and edit files for Post Affiliate Pro integration. Contact Google for domain whitelisting to ensure tracking functions properly.

Google Checkout (in WordPress ecommerce Plugin)

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 ‘/wp-content/plugins/wp-e-commerce/themes/yourthemefolder/shopping_cart_page.php‘ in directory:

or file ‘/wp-content/themes/yourthemefolder/wpsc-shopping_cart_page.php‘ in directory:

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 ‘/wp-content/plugins/wp-e-commerce/wpsc-includes/ajax.functions.php‘ in directory

Find line (about 724):

header('Location: '.get_option('shopping_cart_url'));

Right above this line add:

/* [Post affiliate pro](https://www.postaffiliatepro.com/ "Post Affiliate Pro offers a comprehensive affiliate software platform to manage multiple affiliate programs with ease. Enjoy no setup fees, 24/7 customer support, and a free 1-month trial. Ideal for small and large businesses, it features precise tracking, automated workflows, and customizable tools to boost your affiliate marketing success. Try it now and streamline your affiliate operations effortlessly!") integration /
if(!isset($_REQUEST['pap-merchant-private-data'])){
    $_REQUEST['merchant-private-data'] = '';
}
$_SESSION['pap-merchant-private-data'] = $_REQUEST['pap-merchant-private-data'];
/ [Post affiliate](https://www.postaffiliatepro.com/ "Post Affiliate Pro offers a comprehensive affiliate software platform to manage multiple affiliate programs with ease. Enjoy no setup fees, 24/7 customer support, and a free 1-month trial. Ideal for small and large businesses, it features precise tracking, automated workflows, and customizable tools to boost your affiliate marketing success. Try it now and streamline your affiliate operations effortlessly!") pro integration end */

Edit file

Find and edit file ‘/wp-content/plugins/wp-e-commerce/merchants/GoogleCheckout-XML.php‘ in directory:

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.

Frequently asked questions

What is Google Checkout integration for WordPress e-commerce?

It enables you to connect Google Checkout as a payment gateway in your WordPress-powered online store and track affiliate sales using Post Affiliate Pro.

How do I set up Google Checkout with Post Affiliate Pro?

You need to configure your Google Checkout merchant account, set up API callback URLs, activate the plugin, and add specific code snippets to your WordPress e-commerce files as described in the integration guide.

Why do I need to edit plugin files for integration?

Editing the files allows you to insert custom tracking code and ensure that affiliate sales are correctly tracked by Post Affiliate Pro when using Google Checkout.

Is my domain required to be whitelisted for Google Checkout tracking?

Yes, you should contact checkout-api-support@google.com to request whitelisting of your domain; otherwise, tracking may not work properly.

Can I try Post Affiliate Pro before purchasing?

Yes, Post Affiliate Pro offers a 1-month free trial so you can experience all features, including Google Checkout integration, before making a purchase.

Lucia is a talented content editor who ensures the seamless publication of content across multiple platforms.

Lucia Halašková
Lucia Halašková
Content Editor

Try Post Affiliate Pro for Free

Experience seamless affiliate integrations like Google Checkout in WordPress e-commerce. Start your 1-month free trial of Post Affiliate Pro today!

You will be in Good Hands!

Join our community of happy clients and provide excellent customer support with Post Affiliate Pro.

Capterra
G2 Crowd
GetApp
Post Affiliate Pro Dashboard - Campaign Manager Interface