From fa23a75c3918a56ca8b338e357761213075aec86 Mon Sep 17 00:00:00 2001 From: Paul Driver Date: Mon, 13 Jul 2009 22:34:38 +0000 Subject: [PATCH] tabs->spaces in PayPal i18n file (was inconsistant) and a couple of doc changes per colin's suggestions. --- docs/changelog/7.x.x.txt | 3 +- docs/gotcha.txt | 10 +- lib/WebGUI/Shop/PayDriver/PayPal.pm | 6 +- lib/WebGUI/i18n/English/PayDriver_PayPal.pm | 178 +++++++++++--------- 4 files changed, 106 insertions(+), 91 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c65d64831..f5f96c10c 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -3,7 +3,8 @@ - fixed #10626: Carriage returns stripped from Wiki comments - fixed #10572: CDN / CloudFront breaks 7.7.11 upgrade - fixed #10630: If macro says that 0 is true - - PayDriver::PayPal replaced. The old one fought the Shop API and + - WebGUI::Shop::PayDriver::PayPal::PayPalStd replaced by + WebGUI::Shop::PayDriver::PayPal. PayPalStd fought the Shop API and didn't work. 7.7.14 diff --git a/docs/gotcha.txt b/docs/gotcha.txt index f7b9dbc5d..9f06605ce 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -9,10 +9,12 @@ save you many hours of grief. 7.7.15 -------------------------------------------------------------------- - * PayDriver::PayPal has been replaced with an entirely different - module. If you had the old one working, the new one very likely - will not work (the old one did some very un-Shop things, which - is why it was replaced). Please test the new one with your setup. + * WebGUI::Shop::PayDriver::PayPal::PayPalStd has been replaced by + WebGUI::Shop::PayDriver::PayPal. The old module by that name (a base + class for PayPalStd) has been removed. If you had the PayPalStd working, + the new module very likely will not work (the old one did some very + un-Shop things, which is why it was replaced). Please test the new one + with your setup. 7.7.13 -------------------------------------------------------------------- diff --git a/lib/WebGUI/Shop/PayDriver/PayPal.pm b/lib/WebGUI/Shop/PayDriver/PayPal.pm index f66a7a367..a9c8c2b70 100644 --- a/lib/WebGUI/Shop/PayDriver/PayPal.pm +++ b/lib/WebGUI/Shop/PayDriver/PayPal.pm @@ -192,7 +192,9 @@ sub processPayment { } my $status = $params->{PAYMENTSTATUS}; - my $message = "Payment Status: $status"; + + my $i18n = WebGUI::International->new( $self->session, $I18N ); + my $message = sprintf $i18n->get('payment status'), $status; return ( 1, $params->{TRANSACTIONID}, $status, $message ); } @@ -278,7 +280,7 @@ sub www_sendToPayPal { unless ( $params->{ACK} =~ /^Success/ ) { my $log = sprintf "Paypal error: Request/response below: %s\n%s\n", Dumper($form), Dumper($params); $session->log->error($log); - $error = 'Internal Paypal Error'; + $error = $i18n->get('internal paypal error'); } } else { diff --git a/lib/WebGUI/i18n/English/PayDriver_PayPal.pm b/lib/WebGUI/i18n/English/PayDriver_PayPal.pm index 7535233c8..5d257d618 100644 --- a/lib/WebGUI/i18n/English/PayDriver_PayPal.pm +++ b/lib/WebGUI/i18n/English/PayDriver_PayPal.pm @@ -3,91 +3,101 @@ package WebGUI::i18n::English::PayDriver_PayPal; use strict; our $I18N = { - 'api' => { - message => q{API URL}, - lastUpdated => 1247254043, - }, - 'api error' => { - message => q{Error communicating with PayPal API: %s}, - lastUpdated => 1247496228, + 'api' => { + message => q{API URL}, + lastUpdated => 1247254043, + }, + 'api error' => { + message => q{Error communicating with PayPal API: %s}, + lastUpdated => 1247496228, context => q{Error message to display on internal error talking to paypal}, - }, - 'api help' => { - message => q{Base URL for PayPal's NVP api}, - lastUpdated => 1247254068, - }, - 'apiSandbox' => { - message => q{API Sandbox URL}, - lastUpdated => 1247499398, - }, - 'apiSandbox help' => { - message => q{URL for Paypal API in test mode}, - lastUpdated => 1247499415, - }, - 'currency' => { - message => q{Currency Code}, - lastUpdated => 1247253894, - }, - 'currency help' => { - message => q{Paypal currency code to use (e.g. USD)}, - lastUpdated => 1247253924, - }, - 'label' => { - message => q{NewPal}, - lastUpdated => 1247256659, - }, - 'name' => { - message => q{NewPal}, - lastUpdated => 1247256412, - }, - 'password' => { - message => q{Password}, - lastUpdated => 1247254156, - }, - 'password help' => { - message => q{Password from PayPal credentials}, - lastUpdated => 1247254172, - }, - 'paypal' => { - message => q{Paypal URL}, - lastUpdated => 1247498678, - }, - 'paypal help' => { - message => q{URL to use when redirecting to paypal}, - lastUpdated => 1247498700, - }, - 'sandbox' => { - message => q{Sandbox URL}, - lastUpdated => 1247498780, - }, - 'sandbox help' => { - message => q{URL to use for redirecting to paypal in test mode}, - lastUpdated => 1247498766, - }, - 'signature' => { - message => q{Signature}, - lastUpdated => 1247254180, - }, - 'signature help' => { - message => q{Signature from PayPal credentials}, - lastUpdated => 1247254195, - }, - 'testMode' => { - message => q{Test Mode}, - lastUpdated => 1247253942, - }, - 'testMode help' => { - message => q{Whether to use PayPal's sandbox}, - lastUpdated => 1247253981, - }, - 'user' => { - message => q{Username}, - lastUpdated => 1247254097, - }, - 'user help' => { - message => q{Username from Paypal credentials}, - lastUpdated => 1247254128, - }, + }, + 'api help' => { + message => q{Base URL for PayPal's NVP api}, + lastUpdated => 1247254068, + }, + 'apiSandbox' => { + message => q{API Sandbox URL}, + lastUpdated => 1247499398, + }, + 'apiSandbox help' => { + message => q{URL for Paypal API in test mode}, + lastUpdated => 1247499415, + }, + 'currency' => { + message => q{Currency Code}, + lastUpdated => 1247253894, + }, + 'currency help' => { + message => q{Paypal currency code to use (e.g. USD)}, + lastUpdated => 1247253924, + }, + 'internal paypal error' => { + message => q{Internal PayPal Error}, + lastUpdated => 1247524131, + context => q{Message to display when something goes wrong talking to PayPal}, + }, + 'label' => { + message => q{NewPal}, + lastUpdated => 1247256659, + }, + 'name' => { + message => q{NewPal}, + lastUpdated => 1247256412, + }, + 'password' => { + message => q{Password}, + lastUpdated => 1247254156, + }, + 'password help' => { + message => q{Password from PayPal credentials}, + lastUpdated => 1247254172, + }, + 'payment status' => { + message => q{Payment Status: %s}, + lastUpdated => 1247524208, + context => q{Message to be used in receipt page as gateway message. Placeholder is for the actual status.}, + }, + 'paypal' => { + message => q{Paypal URL}, + lastUpdated => 1247498678, + }, + 'paypal help' => { + message => q{URL to use when redirecting to paypal}, + lastUpdated => 1247498700, + }, + 'sandbox' => { + message => q{Sandbox URL}, + lastUpdated => 1247498780, + }, + 'sandbox help' => { + message => q{URL to use for redirecting to paypal in test mode}, + lastUpdated => 1247498766, + }, + 'signature' => { + message => q{Signature}, + lastUpdated => 1247254180, + }, + 'signature help' => { + message => q{Signature from PayPal credentials}, + lastUpdated => 1247254195, + }, + 'testMode' => { + message => q{Test Mode}, + lastUpdated => 1247253942, + }, + 'testMode help' => { + message => q{Whether to use PayPal's sandbox}, + lastUpdated => 1247253981, + }, + 'user' => { + message => q{Username}, + lastUpdated => 1247254097, + }, + 'user help' => { + message => q{Username from Paypal credentials}, + lastUpdated => 1247254128, + }, }; 1;