ITransact and other fixes and migration of payment plugins.
This commit is contained in:
parent
ac9d8cf405
commit
152dfc2838
5 changed files with 501 additions and 273 deletions
|
|
@ -64,6 +64,7 @@ migrateSubscriptions( $session );
|
|||
updateUsersOfCommerceMacros($session);
|
||||
addDBLinkAccessToSQLMacro($session);
|
||||
addAssetManager( $session );
|
||||
migratePaymentPlugins( $session );
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -1386,6 +1387,33 @@ sub addDBLinkAccessToSQLMacro {
|
|||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub migratePaymentPlugins {
|
||||
my $session = shift;
|
||||
print "\tMigrating WebGUI default commerce plugins..." unless $quiet;
|
||||
|
||||
foreach my $namespace (qw{ Cash ITransact }) {
|
||||
my $properties = $session->db->buildHashRef(
|
||||
'select fieldName, fieldValue from commerceSettings where type=\'Payment\' and namespace=?',
|
||||
[
|
||||
$namespace,
|
||||
]
|
||||
);
|
||||
|
||||
$properties->{ groupToUse } = $properties->{ whoCanUse };
|
||||
|
||||
my $plugin = eval {
|
||||
WebGUI::Pluggable::instanciate("WebGUI::Shop::PayDriver::$namespace", 'create', [
|
||||
$session,
|
||||
$properties->{ label },
|
||||
$properties
|
||||
])
|
||||
};
|
||||
}
|
||||
|
||||
print "Done\n" unless $quiet;
|
||||
}
|
||||
|
||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue