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.
Integrate GoPay with Post Affiliate Pro to effortlessly register sale commissions using the API. Learn how to set the SuccessURL parameter, send special data, and ensure smooth commission registration. Enhance your affiliate marketing with a tailored dashboard and explore its benefits by scheduling a call with us today!
Integrate PayPal seamlessly with Post Affiliate Pro using IPN callback to track sales and generate commissions for affiliates. Follow our simple steps to set up the PayPal IPN handling plugin and ensure your transactions are efficiently managed. Discover the benefits of streamlined affiliate management with Post Affiliate Pro today!