PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Raj Kumar Trivedi   Google Checkout Simple   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Google Checkout Simple
Class: Google Checkout Simple
Show buttons to pay products with Google Checkout
Author: By
Last change:
Date: 15 years ago
Size: 705 bytes
 

Contents

Class file image Download
<?php
require_once 'google.checkout.inc.php';
$gch = new googleCheckout('467054554663234', 'sandbox', 'USD');
$gch->addItem('Product 1', 'Description of Product 1...', 5, 12.95);
$gch->addItem('Product 2', 'Description of Product 2...', 1, 10.55);
$gch->addDiscount('Discount', 'Description of discount...', 20.00);
$gch->addShippingMethod('Ground Method', 'Description of shipping method 1', 10.75, 'ALL');
$gch->addShippingMethod('3 Days Shipping', 'Description of shipping method 2', 10.25, 'ALL');
$gch->addShippingMethod('5 Days Shipping', 'Description of shipping method 3', 10.15, 'FULL_50_STATES');
$gch->setTaxRate(0.085, 'CA');
echo
$gch->showButton('large', 'white', false, true);
?>