diff --git a/README.md b/README.md index f0ed4ba6eecb05909edc28c644773ed524a1cadb..c9dc62a2b1ae3a8f88399da0a525e02d4f35616c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Make sure to use git clone --recursive on this repository to get the submodule. sudo -u postgres psql CREATE DATABASE jmp; GRANT ALL ON DATABASE jmp TO unix_user; + \c jmp + CREATE EXTENSION btree_gist; + CREATE EXTENSION citext; + CREATE EXTENSION pgcrypto; exit sudo apt install sqitch cd schemas @@ -12,3 +16,20 @@ Make sure to use git clone --recursive on this repository to get the submodule. cp config.dhall.sample config.dhall $EDITOR config.dhall # Set up appropriately for local prosody, braintree, etc bundle exec ruby sgx_jmp.rb ./config.dhall + + +## Helpful keys for registration + +If you want to register with the backend without going through braintree or electrum, you can set the following two keys in Redis: + + SET "jmp_customer_id-\\40@cheogram" 0001 + SET "jmp_customer_jid-0001" "jmp_customer_id-\\40@cheogram" + +Where cheogram is whatever the component is called, and 0001 is whatever you want the user's customer ID to be. + +And then in psql: + INSERT INTO plan_log (customer_id, plan_name, date_range) VALUES ('0001', 'plan_name', tsrange('1990-01-01', '2023-01-01')); + +These together will ensure that the customer already has an ID, and so braintree doesn't need to be asked to create one, and the plan is activated, so we don't need to attempt to accept payment. + +Then when you run "register" from cheogram, it will skip right to the end and allow you to begin routing to this component.