Google::Checkout::General::MerchantCalculatedShipping
use Google::Checkout::General::GCO; use Google::Checkout::General::MerchantCheckoutFlow; use Google::Checkout::General::MerchantCalculatedShipping; use Google::Checkout::General::ShoppingCart; use Google::Checkout::General::ShippingRestrictions; use Google::Checkout::General::Util qw/is_gco_error/; my $gco = Google::Checkout::General::GCO->new; my $restriction = Google::Checkout::General::ShippingRestrictions->new( allowed_state => ['CA'], excluded_zip => ['90*']); my $custom_shipping = Google::Checkout::General::MerchantCalculatedShipping->new( price => 9.99, restriction => $restrition; shipping_name => "Custom shipping"); my $checkout_flow = Google::Checkout::General::MerchantCheckoutFlow->new( shipping_method => [$custom_shipping], edit_cart_url => "http://...", continue_shopping_url => "http://...", buyer_phone => "1-111-111-1111", tax_table => [$table1, $table2], merchant_calculation => $merchant_calculation); my $cart = Google::Checkout::General::ShoppingCart->new( expiration => "+1 month", private => "Private data", checkout_flow => $checkout_flow); $cart->add_item($item1); $cart->add_item($item2); my $response = $gco->checkout($cart); die $response if is_gco_error($response); #-- #-- redirect URL #-- print $response,"\n";
Sub-class of Google::Checkout::General::Shipping. Create custom shipping method which can be used to add to merchant checkout flow.
Google::Checkout::General::Shipping
Constructor. Takes a shipping name and a price. The RESTRICTION argument should be a Google::Checkout::General::ShippingRestrictions object. Please see Google::Checkout::General::ShippingRestrictions for more detail of how to create one.
Google::Checkout::General::ShippingRestrictions
Copyright 2006 Google. All rights reserved.
Google::Checkout::General::Shipping Google::Checkout::General::ShippingRestrictions
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.