From: Jason Etheridge Date: Wed, 20 Oct 2021 01:32:05 +0000 (-0400) Subject: LP1993305 Comprise SmartPay support, schema X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=35b251880ec96c31e8a4d25b71e4d6721bfff261;p=Evergreen.git LP1993305 Comprise SmartPay support, schema Squashed commits: * schema * SmartPAY location ID description Signed-off-by: Jason Etheridge Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 4cdff6ca6a..2bc8a2059c 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -4374,7 +4374,7 @@ INSERT into config.org_unit_setting_type 'Name default credit processor', 'coust', 'label'), oils_i18n_gettext('credit.processor.default', - 'This might be "AuthorizeNet", "PayPal", "PayflowPro", or "Stripe".', + 'This might be "AuthorizeNet", "PayPal", "PayflowPro", "SmartPAY", or "Stripe".', 'coust', 'description'), 'string', null) @@ -4477,6 +4477,78 @@ INSERT into config.org_unit_setting_type 'coust', 'description'), 'bool', null) +,( 'credit.processor.smartpay.enabled', 'credit', + oils_i18n_gettext('credit.processor.smartpay.enabled', + 'Enable SmartPAY payments', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.enabled', + 'Enable SmartPAY payments', + 'coust', 'description'), + 'bool', null) + +,( 'credit.processor.smartpay.location_id', 'credit', + oils_i18n_gettext('credit.processor.smartpay.location_id', + 'SmartPAY location ID', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.location_id', + 'SmartPAY location ID', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.customer_id', 'credit', + oils_i18n_gettext('credit.processor.smartpay.customer_id', + 'SmartPAY customer ID', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.customer_id', + 'SmartPAY customer ID', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.login', 'credit', + oils_i18n_gettext('credit.processor.smartpay.login', + 'SmartPAY login name', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.login', + 'SmartPAY login name', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.password', 'credit', + oils_i18n_gettext('credit.processor.smartpay.password', + 'SmartPAY password', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.password', + 'SmartPAY password', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.api_key', 'credit', + oils_i18n_gettext('credit.processor.smartpay.api_key', + 'SmartPAY API key', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.api_key', + 'SmartPAY API key', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.server', 'credit', + oils_i18n_gettext('credit.processor.smartpay.server', + 'SmartPAY server name', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.server', + 'SmartPAY server name', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.port', 'credit', + oils_i18n_gettext('credit.processor.smartpay.port', + 'SmartPAY server port', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.port', + 'SmartPAY server port', + 'coust', 'description'), + 'string', null) + ,( 'credit.processor.stripe.enabled', 'credit', oils_i18n_gettext('credit.processor.stripe.enabled', 'Enable Stripe payments', diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.smartpay.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.smartpay.sql new file mode 100644 index 0000000000..adfc08fb2b --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.smartpay.sql @@ -0,0 +1,97 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +INSERT into config.org_unit_setting_type +( name, grp, label, description, datatype, fm_class ) VALUES + + ( 'credit.processor.smartpay.enabled', 'credit', + oils_i18n_gettext('credit.processor.smartpay.enabled', + 'Enable SmartPAY payments', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.enabled', + 'Enable SmartPAY payments', + 'coust', 'description'), + 'bool', null) + +,( 'credit.processor.smartpay.location_id', 'credit', + oils_i18n_gettext('credit.processor.smartpay.location_id', + 'SmartPAY location ID', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.location_id', + 'SmartPAY location ID")', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.customer_id', 'credit', + oils_i18n_gettext('credit.processor.smartpay.customer_id', + 'SmartPAY customer ID', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.customer_id', + 'SmartPAY customer ID', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.login', 'credit', + oils_i18n_gettext('credit.processor.smartpay.login', + 'SmartPAY login name', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.login', + 'SmartPAY login name', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.password', 'credit', + oils_i18n_gettext('credit.processor.smartpay.password', + 'SmartPAY password', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.password', + 'SmartPAY password', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.api_key', 'credit', + oils_i18n_gettext('credit.processor.smartpay.api_key', + 'SmartPAY API key', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.api_key', + 'SmartPAY API key', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.server', 'credit', + oils_i18n_gettext('credit.processor.smartpay.server', + 'SmartPAY server name', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.server', + 'SmartPAY server name', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.smartpay.port', 'credit', + oils_i18n_gettext('credit.processor.smartpay.port', + 'SmartPAY server port', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.smartpay.port', + 'SmartPAY server port', + 'coust', 'description'), + 'string', null) +; + +UPDATE config.org_unit_setting_type +SET description = oils_i18n_gettext('credit.processor.default', + 'This might be "AuthorizeNet", "PayPal", "PayflowPro", "SmartPAY", or "Stripe".', + 'coust', 'description') +WHERE name = 'credit.processor.default' AND description = 'This might be "AuthorizeNet", "PayPal", "PayflowPro", or "Stripe".'; -- don't clobber local edits or i18n + +UPDATE config.org_unit_setting_type + SET view_perm = (SELECT id FROM permission.perm_list + WHERE code = 'VIEW_CREDIT_CARD_PROCESSING' LIMIT 1) + WHERE name LIKE 'credit.processor.smartpay.%' AND view_perm IS NULL; + +UPDATE config.org_unit_setting_type + SET update_perm = (SELECT id FROM permission.perm_list + WHERE code = 'ADMIN_CREDIT_CARD_PROCESSING' LIMIT 1) + WHERE name LIKE 'credit.processor.smartpay.%' AND update_perm IS NULL; + +COMMIT;