From f042a0325e9bb7eb6b264769ab28ac5237c0e97f Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 27 Jan 2014 12:17:46 -0500 Subject: [PATCH] Bug 11622 [DB Update] - Add ability to pay fees and fines from OPAC via PayPal --- installer/data/mysql/atomicupdate/bug_11622.sql | 7 +++++++ installer/data/mysql/sysprefs.sql | 6 ++++++ installer/data/mysql/updatedatabase.pl | 17 +++++++++++++++++ 3 files changed, 30 insertions(+), 0 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_11622.sql diff --git a/installer/data/mysql/atomicupdate/bug_11622.sql b/installer/data/mysql/atomicupdate/bug_11622.sql new file mode 100644 index 0000000..acc5443 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_11622.sql @@ -0,0 +1,7 @@ +INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type ) VALUES +( 'EnablePayPalOpacPayments', '0', NULL , 'Enables the ability to pay fees and fines from the OPAC via PayPal', 'YesNo' ), +( 'PayPalChargeDescription', 'Koha fee payment', NULL , 'This preference defines what the user will see the charge listed as in PayPal', 'Free' ), +( 'PayPalPwd', '', NULL , 'Your PayPal API password', 'Free' ), +( 'PayPalSandboxMode', '1', NULL , 'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.', 'YesNo' ), +( 'PayPalSignature', '', NULL , 'Your PayPal API signature', 'Free' ), +( 'PayPalUser', '', NULL , 'Your PayPal API username ( email address )', 'Free' ); diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 8fd6bf5..6bafacd 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -338,6 +338,12 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PatronSelfRegistrationExpireTemporaryAccountsDelay','0',NULL,'If PatronSelfRegistrationDefaultCategory is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.','Integer'), ('PatronSelfRegistrationVerifyByEmail','0',NULL,'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate his or her account.','YesNo'), ('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'), +('EnablePayPalOpacPayments', '0', NULL , 'Enables the ability to pay fees and fines from the OPAC via PayPal', 'YesNo' ), +('PayPalChargeDescription', 'Koha fee payment', NULL , 'This preference defines what the user will see the charge listed as in PayPal', 'Free'), +('PayPalPwd', '', NULL , 'Your PayPal API password', 'Free'), +('PayPalSandboxMode', '1', NULL , 'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.', 'YesNo'), +('PayPalSignature', '', NULL , 'Your PayPal API signature', 'Free'), +('PayPalUser', '', NULL , 'Your PayPal API username ( email address )', 'Free'), ('Persona','0','','Use Mozilla Persona for login','YesNo'), ('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'), ('previousIssuesDefaultSortOrder','asc','asc|desc','Specify the sort order of Previous Issues on the circulation page','Choice'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 38de9c8..4eeb8e5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10623,6 +10623,23 @@ foreach my $file ( sort readdir $dirh ) { } } +$DBversion = "3.15.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + INSERT INTO systempreferences (variable, value, options, explanation, type ) + VALUES + ( 'EnablePayPalOpacPayments', '0', NULL , 'Enables the ability to pay fees and fines from the OPAC via PayPal', 'YesNo' ), + ( 'PayPalChargeDescription', 'Koha fee payment', NULL , 'This preference defines what the user will see the charge listed as in PayPal', 'Free' ), + ( 'PayPalPwd', '', NULL , 'Your PayPal API password', 'Free' ), + ( 'PayPalSandboxMode', '1', NULL , 'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.', 'YesNo' ), + ( 'PayPalSignature', '', NULL , 'Your PayPal API signature', 'Free' ), + ( 'PayPalUser', '', NULL , 'Your PayPal API username ( email address )', 'Free' ) + }); + + print "Upgrade to $DBversion done (Bug 11622 - Add ability to pay fees and fines from OPAC via PayPal)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 1.7.2.5