Document what changes need to be made to the PayDriver for cart changes in 7.9.4. Change how the upgrade sub dies if a custom plugin is found. Fixes bug #11799.

This commit is contained in:
Colin Kuskie 2010-08-20 08:46:52 -07:00
parent 4bf7eb4cfb
commit 20a0b29df5
4 changed files with 37 additions and 1 deletions

View file

@ -6,6 +6,7 @@
- fixed #11777: Thingy search on yes no field fails
- fixed #11787: Gallery resolutions wrongly ordered
- fixed #11785: Article title / URL with äÄöÖüÜ (reopen #11683)
- fixed #11799: 7.8.24->7.9.11 upgrade breaks on custom Paydrivers
7.9.12
- webgui.org homepage gives 404 (#11778)

View file

@ -51,6 +51,13 @@ save you many hours of grief.
* The Cart will now work without javascript. Javascript is used to make parts of the cart easier,
and to automatically update the user's cart so they don't have to manually update it.
* All custom Payment drivers have to be rewritten. Please read the POD for
WebGUI::Shop::PayDriver for information about the update. The upgrade script for 7.9.4
is designed to die if a non-core payment driver is detected, so after updating your custom
driver you will need to change the upgrade script.
* Custom cart templates will need to be updated to accomodate the new cart design.
7.9.3
--------------------------------------------------------------------
* Test:Deep, which had been an optional dependency for testing, has been used

View file

@ -25,6 +25,7 @@ use WebGUI::Asset;
use WebGUI::Asset::WikiPage;
use WebGUI::Exception;
use WebGUI::Shop::Pay;
use WebGUI::Utility qw/isIn/;
my $toVersion = '7.9.4';
@ -182,7 +183,8 @@ sub addPayDriverTemplates {
$properties->{summaryTemplateId} = 'GqnZPB0gLoZmqQzYFaq7bg';
}
else {
die "Unknown payment driver type found. Unable to automatically upgrade.\n";
warn "Unknown payment driver type found. Unable to automatically upgrade.\n";
next GATEWAY;
}
$gateway->update($properties);
}
@ -232,6 +234,17 @@ sub start {
);
my $session = WebGUI::Session->open($webguiRoot,$configFile);
$session->user({userId=>3});
my $pay = WebGUI::Shop::Pay->new($session);
my @gateways = @{ $pay->getPaymentGateways };
GATEWAY: foreach my $gateway (@gateways) {
next GATEWAY unless $gateway;
if (! isIn ($gateway->className, qw/WebGUI::Shop::PayDriver::Cash WebGUI::Shop::PayDriver::Ogone WebGUI::Shop::PayDriver::ITransact WebGUI::Shop::PayDriver::PayPal::PayPalStd WebGUI::Shop::PayDriver::PayPal::ExpressCheckout/) ) {
$session->close;
die "Custom payment driver found:".$gateway->className.". Please read the gotchas.txt file and the POD in WebGUI::Shop::PayDriver on how to update it for the new Cart. Then, you can safely disable this check.\n";
}
}
my $versionTag = WebGUI::VersionTag->getWorking($session);
$versionTag->set({name=>"Upgrade to ".$toVersion});
return $session;

View file

@ -781,5 +781,20 @@ sub www_editSave {
return undef;
}
=head2 CHANGES ( )
=head3 7.9.4
In 7.9.4, the base PayDriver class was changed to accomodate the new Cart. The Cart is now in
charge of gathering billing information. The PayDriver's job is to summarize all the payment
information for the user to review (www_getCredentials) and provide the user a button to complete
the checkout process (getButton), and then to complete the checkout. PayDrivers can
do additional things beyond those steps, like the PayPal driver.
PayDrivers also now have a defult template for displaying that screen, the summaryTemplate.
While each core driver has its own template, custom drivers can use any existing one that
meets its needs.
=cut
1;