LP1993305 Comprise SmartPay release notes
[evergreen-equinox.git] / Open-ILS / src / sql / Pg / upgrade / XXXX.data.smartpay.sql
1 BEGIN;
2
3 SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
4
5 INSERT into config.org_unit_setting_type
6 ( name, grp, label, description, datatype, fm_class ) VALUES
7
8     ( 'credit.processor.smartpay.enabled', 'credit',
9     oils_i18n_gettext('credit.processor.smartpay.enabled',
10         'Enable SmartPAY payments',
11         'coust', 'label'),
12     oils_i18n_gettext('credit.processor.smartpay.enabled',
13         'Enable SmartPAY payments',
14         'coust', 'description'),
15     'bool', null)
16
17 ,( 'credit.processor.smartpay.location_id', 'credit',
18     oils_i18n_gettext('credit.processor.smartpay.location_id',
19         'SmartPAY location ID',
20         'coust', 'label'),
21     oils_i18n_gettext('credit.processor.smartpay.location_id',
22         'SmartPAY location ID")',
23         'coust', 'description'),
24     'string', null)
25
26 ,( 'credit.processor.smartpay.customer_id', 'credit',
27     oils_i18n_gettext('credit.processor.smartpay.customer_id',
28         'SmartPAY customer ID',
29         'coust', 'label'),
30     oils_i18n_gettext('credit.processor.smartpay.customer_id',
31         'SmartPAY customer ID',
32         'coust', 'description'),
33     'string', null)
34
35 ,( 'credit.processor.smartpay.login', 'credit',
36     oils_i18n_gettext('credit.processor.smartpay.login',
37         'SmartPAY login name',
38         'coust', 'label'),
39     oils_i18n_gettext('credit.processor.smartpay.login',
40         'SmartPAY login name',
41         'coust', 'description'),
42     'string', null)
43
44 ,( 'credit.processor.smartpay.password', 'credit',
45     oils_i18n_gettext('credit.processor.smartpay.password',
46         'SmartPAY password',
47         'coust', 'label'),
48     oils_i18n_gettext('credit.processor.smartpay.password',
49         'SmartPAY password',
50         'coust', 'description'),
51     'string', null)
52
53 ,( 'credit.processor.smartpay.api_key', 'credit',
54     oils_i18n_gettext('credit.processor.smartpay.api_key',
55         'SmartPAY API key',
56         'coust', 'label'),
57     oils_i18n_gettext('credit.processor.smartpay.api_key',
58         'SmartPAY API key',
59         'coust', 'description'),
60     'string', null)
61
62 ,( 'credit.processor.smartpay.server', 'credit',
63     oils_i18n_gettext('credit.processor.smartpay.server',
64         'SmartPAY server name',
65         'coust', 'label'),
66     oils_i18n_gettext('credit.processor.smartpay.server',
67         'SmartPAY server name',
68         'coust', 'description'),
69     'string', null)
70
71 ,( 'credit.processor.smartpay.port', 'credit',
72     oils_i18n_gettext('credit.processor.smartpay.port',
73         'SmartPAY server port',
74         'coust', 'label'),
75     oils_i18n_gettext('credit.processor.smartpay.port',
76         'SmartPAY server port',
77         'coust', 'description'),
78     'string', null)
79 ;
80
81 UPDATE config.org_unit_setting_type
82 SET description = oils_i18n_gettext('credit.processor.default',
83         'This might be "AuthorizeNet", "PayPal", "PayflowPro", "SmartPAY", or "Stripe".',
84         'coust', 'description')
85 WHERE name = 'credit.processor.default' AND description = 'This might be "AuthorizeNet", "PayPal", "PayflowPro", or "Stripe".'; -- don't clobber local edits or i18n
86
87 UPDATE config.org_unit_setting_type
88     SET view_perm = (SELECT id FROM permission.perm_list
89         WHERE code = 'VIEW_CREDIT_CARD_PROCESSING' LIMIT 1)
90     WHERE name LIKE 'credit.processor.smartpay.%' AND view_perm IS NULL;
91
92 UPDATE config.org_unit_setting_type
93     SET update_perm = (SELECT id FROM permission.perm_list
94         WHERE code = 'ADMIN_CREDIT_CARD_PROCESSING' LIMIT 1)
95     WHERE name LIKE 'credit.processor.smartpay.%' AND update_perm IS NULL;
96
97 COMMIT;