<?php
include ("GlobalAPIFunctions.php");
$xml = '<?xml version="1.0" encoding="UTF-8"?>
<checkout-shopping-cart xmlns="[URL]http://checkout.google.com/schema/2[/URL]">
<shopping-cart>
<items>
<item>
<item-name>Super Software 5000</item-name>
<item-description>Super Software 5000 improves download speeds.</item-description>
<unit-price currency="GBP">0.01</unit-price>
<quantity>1</quantity>
<digital-content>
<display-disposition>OPTIMISTIC</display-disposition>
<description>
Please go to <a href="[URL]http://sound-agency.co.uk">our[/URL] website</a>,
and enter your access key so that you can download our software.
</description>
<key>1456-1514-3657-2198</key>
<url>http://XXX.co.uk</url>
</digital-content>
</item>
</items>
</shopping-cart>
<checkout-flow-support>
<merchant-checkout-flow-support/>
</checkout-flow-support>
</checkout-shopping-cart>';
$key = 'XXX';
$shakey = CalcHmacSha1($xml,$key);
$bxml = base64_encode($xml);
$bkey = base64_encode($shakey);
?>
<html>
<body>
<form method="POST" action="[URL]https://sandbox.google.com/checkout/api/checkout/v2/checkout/Merchant/XXX[/URL]">
<input type="hidden" name="cart" value="<?php echo $bxml; ?>">
<input type="hidden" name="signature" value="<?php echo $bkey;?>">
<input type="image" name="Google Checkout" alt="Fast checkout through Google"
src="[URL]http://sandbox.google.com/checkout/buttons/checkout.gif?merchant_id=XXX[/URL]
&w=180&h=46&style=white&variant=text&loc=en_US" height="46" width="180">
</form>
</body>
</html>