GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Google::Checkout::General::Util(3) User Contributed Perl Documentation Google::Checkout::General::Util(3)

Google::Checkout::General::Util

  use Google::Checkout::General::Util qw/is_gco_error 
                 compute_hmac_sha1 compute_base64
                 date_time_string make_xml_safe is_merchant_item
                 is_shipping_method is_tax_table format_tax_rate
                 get_valid_carrier is_valid_buyer_info
                 is_gift_certificate_object is_digital_content/;

Library contains a group of useful utility functions
is_gco_error OBJECT
Returns true if OBJECT is an object (or sub-class) of "Google::Checkout::General::Error". Returns false otherwise. Many functions reteurns "Google::Checkout::General::Error" to indicate error conditions so it's important to use this function to check for them.
is_merchant_item OBJECT
Returns true if OBJECT is an object (or sub-class) of "Google::Checkout::General::MerchantItem". Returns false otherwise. This function is used internally.
is_shipping_method OBJECT
Returns true if OBJECT is an object (or sub-class) of "Google::Checkout::General::Shipping". Returns false otherwise. This function is used internally.
is_tax_table OBJECT
Returns true if OBJECT is an object (or sub-class) of "Google::Checkout::General::TaxTable". Returns false otherwise. This function is used internally.
compute_hmac_sha1 DATA, B64
Compute HMAC SHA1 for DATA. If B64 is true, also encode it in Base64 before returning.
compute_base64 DATA
Compute Base64 for DATA.
date_time_string DATE_TIME_STRING
Given a valid date/time string, return it in ISO 8601 UTC format. If string is not a valid date/time string, "Google::Checkout::General::Error" is returned.
make_xml_safe XML_DATA
Make XML_DATE safe to be used in a XML document. '&' is turned into '&#x26;', '>' is turned into '&#x3e;' and '<' is turned into '&#x3c;'.
format_tax_rate RATE
Make sure tax rate is in the right format. If RATE is less than 1, it's already in the right form so it's returned without any change. If RATE is equal to or greater than 1, it's assumed to be in percent format (for example, 25 means 25%) in which case it's turned into RATE / 100 (25 / 100 = 0.25).
get_valid_carrier CARRIER
Returns a valid carrier if CARRIER is valid. Returns "Google::Checkout::General::Error" otherwise. This function is used internally.
is_valid_buyer_info BUYER_INFO
This function is used internally.

Copyright 2006 Google. All rights reserved.
2007-09-28 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.