[dw-free] Support Google Checkout
[commit: http://hg.dwscoalition.org/dw-free/rev/f14d6f610694]
http://bugs.dwscoalition.org/show_bug.cgi?id=2321
Do not die if Google Checkout modules are not installed.
Patch by
afuna.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2321
Do not die if Google Checkout modules are not installed.
Patch by
Files modified:
- cgi-bin/DW/Shop/Engine/GoogleCheckout.pm
--------------------------------------------------------------------------------
diff -r f51750942eb2 -r f14d6f610694 cgi-bin/DW/Shop/Engine/GoogleCheckout.pm
--- a/cgi-bin/DW/Shop/Engine/GoogleCheckout.pm Wed Feb 17 04:50:44 2010 +0000
+++ b/cgi-bin/DW/Shop/Engine/GoogleCheckout.pm Wed Feb 17 04:52:18 2010 +0000
@@ -38,6 +38,9 @@ USE
USE
warn "NOTE: Google::Checkout::* Perl modules were not found.\n"
unless $rv;
+
+ # avoid compile error, if we don't have the google checkout modules installed
+ our $EMAIL_DELIVERY = eval { no strict "subs"; Google::Checkout::General::DigitalContent::EMAIL_DELIVERY };
}
use base qw/ DW::Shop::Engine /;
@@ -142,7 +145,7 @@ sub checkout_url {
price => $item->cost,
quantity => 1,
private => $item->id,
- delivery_method => Google::Checkout::General::DigitalContent::EMAIL_DELIVERY,
+ delivery_method => $DW::Shop::Engine::GoogleCheckout::EMAIL_DELIVERY,
);
$gcart->add_item( $gitem );
--------------------------------------------------------------------------------
