From: Dan Wells Date: Thu, 20 Feb 2014 21:35:21 +0000 (-0500) Subject: Stamping 0863 - Stripe credit card payment options X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=29304452c4e2096851bc77649d1f93fe6f71de53;p=evergreen%2Fmasslnc.git Stamping 0863 - Stripe credit card payment options Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 27bf1fad27..8e196d3c08 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps BEFORE INSERT OR UPDATE ON config.db_patch_dependencies FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates'); -INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0862', :eg_version); -- dbs/dbwells +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0863', :eg_version); -- senator/dbwells CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0863.data.stripe-payments.sql b/Open-ILS/src/sql/Pg/upgrade/0863.data.stripe-payments.sql new file mode 100644 index 0000000000..10a391191e --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0863.data.stripe-payments.sql @@ -0,0 +1,51 @@ +BEGIN; + + +SELECT evergreen.upgrade_deps_block_check('0863', :eg_version); + + +-- cheat sheet for enabling Stripe payments: +-- 'credit.payments.allow' must be true, and among other things it drives the +-- opac to render a payment form at all +-- NEW 'credit.processor.stripe.enabled' must be true (kind of redundant but +-- my fault for setting the precedent with c.p.{authorizenet|paypal|payflowpro}.enabled) +-- 'credit.default.processor' must be 'Stripe' +-- NEW 'credit.processor.stripe.pubkey' must be set +-- NEW 'credit.processor.stripe.secretkey' must be set + +INSERT into config.org_unit_setting_type +( name, grp, label, description, datatype, fm_class ) VALUES + + ( 'credit.processor.stripe.enabled', 'credit', + oils_i18n_gettext('credit.processor.stripe.enabled', + 'Enable Stripe payments', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.stripe.enabled', + 'Enable Stripe payments', + 'coust', 'description'), + 'bool', null) + +,( 'credit.processor.stripe.pubkey', 'credit', + oils_i18n_gettext('credit.processor.stripe.pubkey', + 'Stripe publishable key', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.stripe.pubkey', + 'Stripe publishable key', + 'coust', 'description'), + 'string', null) + +,( 'credit.processor.stripe.secretkey', 'credit', + oils_i18n_gettext('credit.processor.stripe.secretkey', + 'Stripe secret key', + 'coust', 'label'), + oils_i18n_gettext('credit.processor.stripe.secretkey', + 'Stripe secret key', + 'coust', 'description'), + 'string', null) +; + +UPDATE config.org_unit_setting_type +SET description = 'This might be "AuthorizeNet", "PayPal", "PayflowPro", or "Stripe".' +WHERE name = 'credit.processor.default' AND description = 'This might be "AuthorizeNet", "PayPal", etc.'; -- don't clobber local edits or i18n + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.stripe-payments.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.stripe-payments.sql deleted file mode 100644 index 25a3a4137f..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.stripe-payments.sql +++ /dev/null @@ -1,51 +0,0 @@ -BEGIN; - - --- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); - - --- cheat sheet for enabling Stripe payments: --- 'credit.payments.allow' must be true, and among other things it drives the --- opac to render a payment form at all --- NEW 'credit.processor.stripe.enabled' must be true (kind of redundant but --- my fault for setting the precedent with c.p.{authorizenet|paypal|payflowpro}.enabled) --- 'credit.default.processor' must be 'Stripe' --- NEW 'credit.processor.stripe.pubkey' must be set --- NEW 'credit.processor.stripe.secretkey' must be set - -INSERT into config.org_unit_setting_type -( name, grp, label, description, datatype, fm_class ) VALUES - - ( 'credit.processor.stripe.enabled', 'credit', - oils_i18n_gettext('credit.processor.stripe.enabled', - 'Enable Stripe payments', - 'coust', 'label'), - oils_i18n_gettext('credit.processor.stripe.enabled', - 'Enable Stripe payments', - 'coust', 'description'), - 'bool', null) - -,( 'credit.processor.stripe.pubkey', 'credit', - oils_i18n_gettext('credit.processor.stripe.pubkey', - 'Stripe publishable key', - 'coust', 'label'), - oils_i18n_gettext('credit.processor.stripe.pubkey', - 'Stripe publishable key', - 'coust', 'description'), - 'string', null) - -,( 'credit.processor.stripe.secretkey', 'credit', - oils_i18n_gettext('credit.processor.stripe.secretkey', - 'Stripe secret key', - 'coust', 'label'), - oils_i18n_gettext('credit.processor.stripe.secretkey', - 'Stripe secret key', - 'coust', 'description'), - 'string', null) -; - -UPDATE config.org_unit_setting_type -SET description = 'This might be "AuthorizeNet", "PayPal", "PayflowPro", or "Stripe".' -WHERE name = 'credit.processor.default' AND description = 'This might be "AuthorizeNet", "PayPal", etc.'; -- don't clobber local edits or i18n - -COMMIT;