add default values to existing, default Payment drivers
This commit is contained in:
parent
ca8ad4f4c2
commit
c01d4e89c4
2 changed files with 19 additions and 2 deletions
|
|
@ -27,6 +27,7 @@
|
||||||
- fixed: Thingy fields list on view screen tab
|
- fixed: Thingy fields list on view screen tab
|
||||||
- fixed: Importing data into Thingy that has newlines embedded in fields
|
- fixed: Importing data into Thingy that has newlines embedded in fields
|
||||||
- fixed: Keywords field is not available in collaboration system post template
|
- fixed: Keywords field is not available in collaboration system post template
|
||||||
|
- fixed: Payment Gateway creation bug
|
||||||
|
|
||||||
7.5.18
|
7.5.18
|
||||||
- fixed: Collateral Image Manager broken in Firefox 3
|
- fixed: Collateral Image Manager broken in Firefox 3
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ addNewInboxIndexes( $session );
|
||||||
updateAddressTable( $session );
|
updateAddressTable( $session );
|
||||||
addProductShipping( $session );
|
addProductShipping( $session );
|
||||||
addGalleryImageDensity( $session );
|
addGalleryImageDensity( $session );
|
||||||
correctPayDriverReceiptTemplate( $session );
|
updatePaymentDrivers( $session );
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -61,7 +61,7 @@ sub addGalleryImageDensity {
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Corrects the asset id of the default receipt email template for the PayDriver
|
# Corrects the asset id of the default receipt email template for the PayDriver
|
||||||
sub correctPayDriverReceiptTemplate{
|
sub updatePaymentDrivers{
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
|
|
||||||
#Grab all PaymentDriver id's.
|
#Grab all PaymentDriver id's.
|
||||||
|
|
@ -69,8 +69,24 @@ sub correctPayDriverReceiptTemplate{
|
||||||
for my $id(@ids){
|
for my $id(@ids){
|
||||||
my $paymentGateway = WebGUI::Shop::PayDriver->new($session,$id);
|
my $paymentGateway = WebGUI::Shop::PayDriver->new($session,$id);
|
||||||
my $options = $paymentGateway->get();
|
my $options = $paymentGateway->get();
|
||||||
|
my $needsUpdated = 0;
|
||||||
if($options->{'receiptEmailTemplateId'} eq 'BMzuE91-XB8E-XGll1zpvA'){
|
if($options->{'receiptEmailTemplateId'} eq 'BMzuE91-XB8E-XGll1zpvA'){
|
||||||
$options->{'receiptEmailTemplateId'} = 'bPz1yk6Y9uwMDMBcmMsSCg';
|
$options->{'receiptEmailTemplateId'} = 'bPz1yk6Y9uwMDMBcmMsSCg';
|
||||||
|
$needsUpdated = 1;
|
||||||
|
}
|
||||||
|
if ( exists $options->{'groupToUse'} and !defined $options->{'groupToUse'}) {
|
||||||
|
$options->{'groupToUse'} = 7; #Everyone
|
||||||
|
$needsUpdated = 1;
|
||||||
|
}
|
||||||
|
if ( !exists $options->{'saleNotificationGroupId'} ) {
|
||||||
|
$options->{'saleNotificationGroupId'} = 3; #Admins
|
||||||
|
$needsUpdated = 1;
|
||||||
|
}
|
||||||
|
if ( !exists $options->{'enabled'} ) {
|
||||||
|
$options->{'enabled'} = 1; #on
|
||||||
|
$needsUpdated = 1;
|
||||||
|
}
|
||||||
|
if ($needsUpdated) {
|
||||||
$paymentGateway->update($options);
|
$paymentGateway->update($options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue