Fix a bug where the ITransact credentials template was not defined for plugins.

This prevented any credit card transactions from taking place.
This commit is contained in:
Colin Kuskie 2008-12-19 14:55:34 +00:00
parent c9dda0412c
commit eeef2fb330
5 changed files with 37 additions and 5 deletions

View file

@ -2,6 +2,7 @@
- Updated captcha images to be more legible.
- fixed #9285: modifing template prevents edit of syncontent
- fixed #8886: Search button in Asset manager
- fixed #9154: WebGUI Shop - Checkout Caching Problem
7.6.7
- fixed #9263: Thingy possibleValues processing, and List type autodetection.

View file

@ -7,6 +7,13 @@ upgrading from one version to the next, or even between multiple
versions. Be sure to heed the warnings contained herein as they will
save you many hours of grief.
7.6.8
--------------------------------------------------------------------
* Due to an error during the 7.6.6 development cycle, an Itransact template,
for displaying the credentials screen, needs to be reimported. Any changes
that you have made to this module will be lost, so please make a back up
of this template.
7.6.5
--------------------------------------------------------------------
* The deprecated use of Graphics::Magick has been eliminated. WebGUI uses

View file

@ -20,6 +20,8 @@ use Getopt::Long;
use WebGUI::Session;
use WebGUI::Storage;
use WebGUI::Asset;
use WebGUI::Shop::Pay;
use WebGUI::Shop::PayDriver;
my $toVersion = '7.6.8';
@ -29,10 +31,31 @@ my $quiet; # this line required
my $session = start(); # this line required
# upgrade functions go here
setDefaultItransactCredentialTemplate($session);
finish($session); # this line required
#----------------------------------------------------------------------------
# Describe what our function does
sub setDefaultItransactCredentialTemplate {
my $session = shift;
print "\tSet default ITransact Credentials template if it is not set... " unless $quiet;
# and here's our code
my $pay = WebGUI::Shop::Pay->new($session);
my $drivers = $pay->getPaymentGateways($session);
DRIVER: foreach my $driver (@{ $drivers }) {
##Only work on ITransact drivers
next DRIVER unless $driver->className eq "WebGUI::Shop::PayDriver::ITransact";
my $properties = $driver->get();
##And only ones that don't already have a template set
next DRIVER if $properties->{credentialsTemplateId};
$properties->{credentialsTemplateId} = 'itransact_credentials1';
$driver->update($properties);
}
print "DONE!\n" unless $quiet;
}
#----------------------------------------------------------------------------
# Describe what our function does
#sub exampleFunction {

View file

@ -368,10 +368,11 @@ sub definition {
hoverHelp => $i18n->get('use cvv2 help'),
},
credentialsTemplateId => {
fieldType => 'template',
label => $i18n->get('credentials template'),
hoverHelp => $i18n->get('credentials template help'),
namespace => 'Shop/Credentials',
fieldType => 'template',
label => $i18n->get('credentials template'),
hoverHelp => $i18n->get('credentials template help'),
namespace => 'Shop/Credentials',
defaultValue => 'itransact_credentials1',
},
emailMessage => {
fieldType => 'textarea',