Provides integration with Libraries API (2.x-dev) and a Drush Make script to download the google-checkout-php-sample-code.
This project is aimed at providing basic foundation for integrating your online store with the Google Checkout API using PHP.
Configuration
The Google Checkout integration can be configured by using Drupal variables. For example, the following can be placed in a site's settings.php
file.
$conf['google_checkout_merchant_id'] = '...';
$conf['google_checkout_merchant_key'] = '...';
$conf['google_checkout_server_type'] = 'sandbox'; // Defaults to production.
$conf['google_checkout_currency'] = '...'; // Defaults to USD.
Example Usage
<?php
google_checkout_load_include('item');
$cart = google_checkout_cart_init();
$cart->SetMerchantPrivateData(new MerchantPrivateData(array('uid' => $user->uid)));
$item = new GoogleItem(t('Something really nice for $17'), '', 1, 17);
...
// Communicate information to GoogleCheckout and redirect user to complete checkout.
google_checkout_cart_redirect($cart);
// Or make button.
echo $cart->CheckoutButtonCode();
/**
* Handle incoming request from Google Checkout.
*