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
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
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.
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.
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.
./cli_refresh.py
- Re-download the Definitive Membership List: Download as CSV.
- 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
- run ./reconcile_customers_to_qbo.py
- Might have to correct data in the spreadsheet.
- Might have to update QBO (probably with –doit argument)
- If you have to add people to QBO with –doit, you’ll need to then add their QBO IDs to the spreadsheet.
- Maybe repeat this process several times, until
Evaluated ‘[some number of]’ customers. Found ‘0’ problems.
- run ./reconcile_customers_to_stripe.py
- might need to backfill stripe IDs. If you do, then re-download the csv.
- might need to change subscriptions. But touch base with the customers before adding subscriptions back.
- repeat until
Evaluated ‘[some number of]’ customers. Found ‘0’ problems.
- Have they already been recorded? Run ./listinvoices.py; that will check to see if invoices have been run since the first of the month.
- 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
- remember that number. Joe will ask.
- run ./record-invoices.py –doit; invoices are recorded.
- run ./listinvoices.py again, to see that the world has changed.
- ./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.
- ./stripe_payments.py –doit to record those.
- ./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.
- ./stripe_transfers.py –doit to record.
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....
If there’s any substanital pp balance, get it the hell out of there.
started | Finished | Invoices | |||
---|---|---|---|---|---|
[2019-11-05 Tue 15:05] | [2019-11-05 Tue 16:44] | 73 | |||
[2019-12-30 Mon 14:34] | 73 |