The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Google::Checkout::General::MerchantCalculationCallback

SYNOPSIS

  use Google::Checkout::General::MerchantCalculationCallback;

  my $callback = Google::Checkout::General::MerchantCalculationCallback->new(
                 xml => "XML data from Gcogle Checkout");

  print $callback->get_buyer_id(),
        $callback->get_buyer_language(),"\n";

DESCRIPTION

Sub-class of Google::Checkout::Notification::NewOrder. This module can be used to handle merchant calculation callbacks. When a merchant sets up and receives a merchant calculation callback, XML data is passed from Google Checkout. The XML data contains information about the new order as well as buyer detail, this module can be used to extract any information from the XML file.

new XML => ...

Constructor. Takes the XML data passed from Google Checkout.

type

Always return Google::Checkout::XML::Constants::MERCHANT_CALCULATION_CALLBACK.

get_buyer_id

Returns the buyer ID.

get_buyer_language

Returns the buyer language.

get_order_number

Returns the Google order number.

should_tax

Returns 1 if you should tax. Otherwise, returns 0.

get_shipping_methods

Returns an array reference of shipping methods.

get_merchant_code_strings

Returns an array reference of merchant code strings.

get_addresses

Returns an array reference of addresses. Each element of the element in the array is a hash reference with keys: 'id' (ID), 'country_code' (Country code), 'city' (City)), 'postal_code' (Postal code), 'region' (Region)

COPYRIGHT

Copyright 2006 Google. All rights reserved.

SEE ALSO

Google::Checkout::Notification::NewOrder