Google-Checkout
view release on metacpan or search on metacpan
lib/Google/Checkout/General/MerchantCalculatedShipping.pm view on Meta::CPAN
$cart->add_item($item2);
my $response = $gco->checkout($cart);
die $response if is_gco_error($response);
#--
#-- redirect URL
#--
print $response,"\n";
=head1 DESCRIPTION
Sub-class of C<Google::Checkout::General::Shipping>. Create custom shipping method
which can be used to add to merchant checkout flow.
=over 4
=item new SHIPPING_NAME => ..., PRICE => ..., RESTRICTION => ...
Constructor. Takes a shipping name and a price. The RESTRICTION
argument should be a C<Google::Checkout::General::ShippingRestrictions> object. Please
see C<Google::Checkout::General::ShippingRestrictions> for more detail of how to create
one.
=back
=cut
=head1 COPYRIGHT
Copyright 2006 Google. All rights reserved.
=head1 SEE ALSO
Google::Checkout::General::Shipping
Google::Checkout::General::ShippingRestrictions
=cut
#--
#-- <merchant-calculated-shipping></merchant-calculated-shipping>
#--
use strict;
use warnings;
use Google::Checkout::XML::Constants;
use Google::Checkout::General::Shipping;
our @ISA = qw/Google::Checkout::General::Shipping/;
sub new
{
my ($class, %args) = @_;
my $self = $class->SUPER::new(
%args,
name => Google::Checkout::XML::Constants::MERCHANT_CALCULATED_SHIPPING);
return bless $self => $class;
}
1;
( run in 0.514 second using v1.01-cache-2.11-cpan-5a3173703d6 )