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 => "true", tax_table => [$table1, $table2], merchant_calculation => $merchant_calculation, analytics_data => "SW5zZXJ0IDxhbmFseXRpY3MtZGF0YT4gdmFsdWUgaGVyZS4=", parameterized_urls => [$purl1, $purl2]); 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; PARAMETERIZED_URLS, an array reference of Google::Checkout::General::ParameterizedUrl
Google::Checkout::General::Shipping
Google::Checkout::General::TaxTable
Google::Checkout::General::MerchantCalculations
Google::Checkout::General::ParameterizedUrl
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.
Gets weather or not you are requesting the buyers phone number
Sets weather or not you need the buyers phone number
Returns the Google::Checkout::General::MerchantCalculations object.
Sets the Google::Checkout::General::MerchantCalculations object to MERCHANT_CALCULATION.
Returns the analytics data.
Sets the analytics data.
Returns the Google::Checkout::General::ParameterizedUrls object.
Google::Checkout::General::ParameterizedUrls
Sets the Google::Checkout::General::ParameterizedUrls object.
Returns the platform ID
Sets the platform ID
Return parameterized urls as array reference
Adds another parameterized url. PARAMETERIZED_URL should be an object of Google::Checkout::General::ParameterizedUrl.
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.