Google::Checkout::General::ShoppingCart
use Google::Checkout::General::GCO; use Google::Checkout::General::ShoppingCart; use Google::Checkout::General::Util qw/is_gco_error/; my $cart = Google::Checkout::General::ShoppingCart->new( expiration => "+1 month", private => "Private data", checkout_flow => $checkout_flow); my $response = Google::Checkout::General::GCO->new->checkout($cart); die $response if is_gco_error $response; #-- #-- Redirect URL #-- print $response,"\n";
This module is responsible for writing the <shopping-cart> XML.
Constructor. EXPIRATION can be any valid date/time string recognized by Date::Manip. PRIVATE can be any custom private data provided by the merchant. CHECKOUT_FLOW should be a Google::Checkout::General::MerchantCheckoutFlow object.
Date::Manip
Google::Checkout::General::MerchantCheckoutFlow
Returns the expiration time for this shopping cart.
Sets the expiration date for this shopping cart. DATE_TIME_STRING can be anything recognized by the Date::Manip module. perldoc Date::Manip for more detail.
perldoc Date::Manip
Returns the private data (as array reference).
Adds another private data to the shopping cart.
Returns all the merchant items added to this shopping cart so far. It's returned as an array reference where each element is an object of Google::Checkout::General::MerchantItem.
Google::Checkout::General::MerchantItem
Adds another merchant item to the shopping cart. ITEM should be an object of Google::Checkout::General::MerchantItem.
Returns the Google::Checkout::General::MerchantCheckoutFlow object.
Sets the Google::Checkout::General::MerchantCheckoutFlow object.
Copyright 2006 Google. All rights reserved.
Google::Checkout::General::MerchantItem Google::Checkout::General::MerchantCheckoutFlow
To install Google::Checkout::XML::Writer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Google::Checkout::XML::Writer
CPAN shell
perl -MCPAN -e shell install Google::Checkout::XML::Writer
For more information on module installation, please visit the detailed CPAN module installation guide.