]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/0863.data.stripe-payments.sql
LP#1643709: Stamping upgrade scripts
[Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0863.data.stripe-payments.sql
1 BEGIN;
2
3
4 SELECT evergreen.upgrade_deps_block_check('0863', :eg_version);
5
6
7 -- cheat sheet for enabling Stripe payments:
8 --  'credit.payments.allow' must be true, and among other things it drives the
9 --      opac to render a payment form at all
10 --  NEW 'credit.processor.stripe.enabled' must be true  (kind of redundant but
11 --      my fault for setting the precedent with c.p.{authorizenet|paypal|payflowpro}.enabled)
12 --  'credit.default.processor' must be 'Stripe'
13 --  NEW 'credit.processor.stripe.pubkey' must be set
14 --  NEW 'credit.processor.stripe.secretkey' must be set
15
16 INSERT into config.org_unit_setting_type
17 ( name, grp, label, description, datatype, fm_class ) VALUES
18
19     ( 'credit.processor.stripe.enabled', 'credit',
20     oils_i18n_gettext('credit.processor.stripe.enabled',
21         'Enable Stripe payments',
22         'coust', 'label'),
23     oils_i18n_gettext('credit.processor.stripe.enabled',
24         'Enable Stripe payments',
25         'coust', 'description'),
26     'bool', null)
27
28 ,( 'credit.processor.stripe.pubkey', 'credit',
29     oils_i18n_gettext('credit.processor.stripe.pubkey',
30         'Stripe publishable key',
31         'coust', 'label'),
32     oils_i18n_gettext('credit.processor.stripe.pubkey',
33         'Stripe publishable key',
34         'coust', 'description'),
35     'string', null)
36
37 ,( 'credit.processor.stripe.secretkey', 'credit',
38     oils_i18n_gettext('credit.processor.stripe.secretkey',
39         'Stripe secret key',
40         'coust', 'label'),
41     oils_i18n_gettext('credit.processor.stripe.secretkey',
42         'Stripe secret key',
43         'coust', 'description'),
44     'string', null)
45 ;
46
47 UPDATE config.org_unit_setting_type
48 SET description = 'This might be "AuthorizeNet", "PayPal", "PayflowPro", or "Stripe".'
49 WHERE name = 'credit.processor.default' AND description = 'This might be "AuthorizeNet", "PayPal", etc.'; -- don't clobber local edits or i18n
50
51 COMMIT;