Google::Checkout::General::MerchantCheckoutFlow
use Google::Checkout::General::GCO; use Google::Checkout::General::ShoppingCart; use Google::Checkout::General::MerchantCheckoutFlow; use Google::Checkout::General::Util qw/is_gco_error/; my $checkout_flow = Google::Checkout::General::MerchantCheckoutFlow->new( shipping_method => [$method], edit_cart_url => "http://edit/cart/url", continue_shopping_url => "http://continue/shopping/url", 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 = 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 <merchant-checkout-flow-support> XML.
Constructor. The following arguments (passed in as hash) are supported: SHIPPING_METHOD, an array reference of Google::Checkout::General::Shipping or it's sub-class objects; TAX_TABLE, an array reference of Google::Checkout::General::TaxTable objects; EDIT_CART_URL, an edit cart URL; CONTINUE_SHOPPING_URL, a continue shopping URL; BUYER_PHONE, the buyer's phone; MERCHANT_CALCULATION, a Google::Checkout::General::MerchantCalculations object.
Google::Checkout::General::Shipping
Google::Checkout::General::TaxTable
Google::Checkout::General::MerchantCalculations
Returns the shipping methods as array reference.
Adds another shipping method. SHIPPING_METHOD should be an object or one of its sub-class of Google::Checkout::General::Shipping.
Returns the tax tables as array reference.
Adds another tax table. TAX_TABLE should be an object of Google::Checkout::General::TaxTable.
Returns the edit cart URL.
Sets the edit cart URL.
Returns the continue shopping URL.
Sets the continue shopping URL.
Returns the buyer's phone number.
Sets the buyer's phone number.
Returns the Google::Checkout::General::MerchantCalculations object.
Sets the Google::Checkout::General::MerchantCalculations object to MERCHANT_CALCULATION.
Copyright 2006 Google. All rights reserved.
Google::Checkout::General::Shipping Google::Checkout::General::TaxTable Google::Checkout::General::MerchantCalculations
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.