Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

/var/sites/help-site.com/auto/tmp/CPAN/9677/Google-Checkout-1.1.1/lib/Google/Checkout/General/MerchantCheckoutFlow.pm

/var/sites/help-site.com/auto/tmp/CPAN/9677/Google-Checkout-1.1.1/lib/Google/Checkout/General/MerchantCheckoutFlow.pm


NAME

Google::Checkout::General::MerchantCheckoutFlow


SYNOPSIS


  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";


DESCRIPTION

This module is responsible for writing the <merchant-checkout-flow-support> XML.

new HASH
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

get_shipping_method
Returns the shipping methods as array reference.

add_shipping_method SHIPPING_METHOD
Adds another shipping method. SHIPPING_METHOD should be an object or one of its sub-class of Google::Checkout::General::Shipping.

get_tax_table
Returns the tax tables as array reference.

add_tax_table TAX_TABLE
Adds another tax table. TAX_TABLE should be an object of Google::Checkout::General::TaxTable.

get_edit_cart_url
Returns the edit cart URL.

set_edit_cart_url URL
Sets the edit cart URL.

get_continue_shopping_url
Returns the continue shopping URL.

set_continue_shopping_url
Sets the continue shopping URL.

get_buyer_phone
Gets weather or not you are requesting the buyers phone number

set_buyer_phone BOOLEAN
Sets weather or not you need the buyers phone number

get_merchant_calculation
Returns the Google::Checkout::General::MerchantCalculations object.

set_merchant_calculation MERCHANT_CALCULATION
Sets the Google::Checkout::General::MerchantCalculations object to MERCHANT_CALCULATION.

get_analytics_data
Returns the analytics data.

set_analytics_data
Sets the analytics data.

get_parameterized_url
Returns the Google::Checkout::General::ParameterizedUrls object.

set_parameterzied_url
Sets the Google::Checkout::General::ParameterizedUrls object.

get_platform_id
Returns the platform ID

set_platform_id ID
Sets the platform ID

get_parameterized_urls
Return parameterized urls as array reference

add_parameterized_url
Adds another parameterized url. PARAMETERIZED_URL should be an object of Google::Checkout::General::ParameterizedUrl.


COPYRIGHT

Copyright 2006 Google. All rights reserved.


SEE ALSO

Google::Checkout::General::Shipping Google::Checkout::General::TaxTable Google::Checkout::General::MerchantCalculations

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy