Skip to content

Latest commit

 

History

History
220 lines (109 loc) · 5.08 KB

notes.org

File metadata and controls

220 lines (109 loc) · 5.08 KB

New installation.

This was done on ubuntu 19.10

  • Make sure you have python3 virtual environment and dev stuff..

apt-get install python3-venv python3-all-dev

Connect to a company (sandbox example):

We want all the secret bits out of the repo.

The file locations are named in ‘hackerspace_utils.py’;

You’ll need

hackerspace-auth.json

which will need to have [ Which of the values are necessary to get started? ]

Hackerspace-auth is also referenced in the django settings.py

OK, step by step:

Set stripe keys.

Set client ID and secret

Set the redirect to http://localhost:8000/sampleappoauth2/authCodeHandler

This should let you hit the app, authenticate, connect, and write the cache.

Connect to a company (Production example)

You need a proper HTTPS URI for the redirect.

https://fool-quicken-about-localhost.local:8000/sampleappoauth2/authCodeHandler

QBO doesn’t want you doing this to localhost. Why? Dunno.

127.0.1.1 fool-quicken-about-localhost.local

Then you can run the django app in SSL mode:

./manage.py runsslserver

so the URI will resolve.

Set the stripe keys.

Set the client ID and secret.

In settings:

  • set redirect_uri to be https.
  • set the urls not to have sandbox.

Now go to the QBO OAUTH2 playground.

Walk through the connection and get-keys process with them.

Copy the realm, refresh token, access token, and auth code into the auth.json

And… You’re in.

Woot?

Now you need to update everyone’s QBO IDs so they match the new universe. reconcile_customers_to_qbo.py will help. Then you neet to update the account IDs in the payment config so they match the new universe. listaccounts.py will help. Then you need to update the memberships data in hackerspace_utils so they match the new universe. listitems.py will help.

Experimenting with payment applications.

140: months 9,10,11,12

Went to match a payment, found a pledge 9/1;

Match again 9/27: matched 10/1

10/27: matched 11/1

The account of assignment should be the A/R account, not just revenue.

Monthly (or more frequent) procedure:

Update QBO tokens.

./cli_refresh.py

Reconcile member list with QBO:

  1. Re-download the Definitive Membership List: Download as CSV.
  2. Move it to ../memberlist.csv

I do:

make grab

which executes something like:

mv -f /home/asr/Downloads/Definitive\ Membership\ List\ -\ MasterMemberList.csv ../memberlist.csv

  1. run ./reconcile_customers_to_qbo.py
    1. Might have to correct data in the spreadsheet.
    2. Might have to update QBO (probably with –doit argument)
    3. If you have to add people to QBO with –doit, you’ll need to then add their QBO IDs to the spreadsheet.
  2. Maybe repeat this process several times, until

Evaluated ‘[some number of]’ customers. Found ‘0’ problems.

Reconcile member list with Stripe:

  1. run ./reconcile_customers_to_stripe.py
    1. might need to backfill stripe IDs. If you do, then re-download the csv.
    2. might need to change subscriptions. But touch base with the customers before adding subscriptions back.
  2. repeat until

Evaluated ‘[some number of]’ customers. Found ‘0’ problems.

If this is your monthly run, record invoices for the month.

  1. Have they already been recorded? Run ./listinvoices.py; that will check to see if invoices have been run since the first of the month.
  2. run ./record-invoices.py; This will tell you how many invoices we think we ought to be sending.

    This number ought to be just like

    ./validate_customer_data.py | grep Active | wc -l

  3. remember that number. Joe will ask.
  4. run ./record-invoices.py –doit; invoices are recorded.
  5. run ./listinvoices.py again, to see that the world has changed.

Apply Stripe transactions.

  1. ./stripe_payments.py will evaluate payments for the last 45 days. If this is getting done more or less monthly, expect a bolus of already-processed payments towards the end. This is fine.
  2. ./stripe_payments.py –doit to record those.
  1. ./stripe_transfers.py will evaluate transfers (“payouts”) for the last 45 days. Again, if it’s happening monthly-ish, there’ll be some which were already processed.

    Reasonable to crossreference to the display in Stripe proper.

  2. ./stripe_transfers.py –doit to record.

Account for Paypal transactions.

This is a little more intricate. Some of the names of our paypal payees are not identical with the names we’ve got for them. You essentially have to crossreference the paypal records to the records inside the QBO interface, and then assign them to a member.

Could Eventually Be Automated....

Transfer paypal dollars.

If there’s any substanital pp balance, get it the hell out of there.

startedFinishedInvoices
[2019-11-05 Tue 15:05][2019-11-05 Tue 16:44]73
[2019-12-30 Mon 14:34]73