These are chat archives for BVNK/bank

16th
Aug 2016
Assis Ngolo
@figassis
Aug 16 2016 12:10
Hey guys, I’ve been following this chat for a while but just got around to setting up the code on my machine. Ready to start contributing!
Assis Ngolo
@figassis
Aug 16 2016 12:17

So, for the first issue, setting this up is actually not that hard, and can be easily automated, but…Kyle, I have the bank, server and client up and running, but after sending a request:

0~acmt~1~Kyle~Redelinghuys~19700101~197001011234098~55512340987~~email@domain.com~Physical Address 1~~~1000

The only response I get from the server is: 1~”"

No user id.
I see that in server.go, in the processCommand function, line 145, you call CheckToken and that’s where it’s actually returning.

I printed our the error of CheckToken and I get:
Error: appauth.CheckToken: Token not found. redis: nil

Not sure what that means, because redis is running and on configuration.go, I printed out the output of the redis configuration and it’s correct.

Any insight?

Kyle Redelinghuys
@ksred
Aug 16 2016 12:17
Hi Assis! Awesome!
Could you rather try and use the http api?
i havent given the cli love in a while so not sure if it is up to parity
Assis Ngolo
@figassis
Aug 16 2016 12:18
lol, ok, will give it a go
Kyle Redelinghuys
@ksred
Aug 16 2016 12:18
will be bringing it up to speed, need to decide if it is worth it
ya sorry about that
the http api is working nicely though :)
Assis Ngolo
@figassis
Aug 16 2016 12:19
Yeah, no worries, also, the link to the postman collection seems to be an incomplete file. Mind checking that or is it jsut my connection? https://www.getpostman.com/collections/3fc5e1f4a16e691b0b15
Kyle Redelinghuys
@ksred
Aug 16 2016 12:19
i suggest following the postman route outlined above.
i updated it earlier and it seems to have bombed out. here is the json file for importing:
if you are testing locally, please add the following line to /etc/hosts:
127.0.0.1 bvnk.co
Assis Ngolo
@figassis
Aug 16 2016 12:21
ok, will do
thanks!
Kyle Redelinghuys
@ksred
Aug 16 2016 12:21
otherwise test accounts will be created on the live system. ill get to making a dev environment now that there is more interest
let me know if that file is good.
Assis Ngolo
@figassis
Aug 16 2016 12:23
Awesome, file is good, collection imported
Kyle Redelinghuys
@ksred
Aug 16 2016 12:23
awesome, ill add it to bvnk.co so we can download directly
ps @figassis I am uploading the ipa for you now to test on your iOS device.
Assis Ngolo
@figassis
Aug 16 2016 12:24
sweet, I saw the screenshots and looks great
will work well for an MVP
Kyle Redelinghuys
@ksred
Aug 16 2016 12:26
thanks. yeah it’s working so nicely on my device, just need to fix the dev env again so I can get it building (npm/react can be difficult env wise)
Assis Ngolo
@figassis
Aug 16 2016 12:53

So @ksred, I’ve run the http server and sent a create account request, but it hangs. After a few seconds I cancel the request and I still see nothing on the terminal. But about 20 seconds later, I see the following terminal output:

[0 acmt 1 Test User1 1900-01-01 19000101-1234-124 (555) 555-1234 (555) 555-4321 test@user.com Address 1 Address 2 Address 3 1234]

I might be doing something wrong

Kyle Redelinghuys
@ksred
Aug 16 2016 12:54
That is odd. Try run this:
curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: 2526bd05-5d4b-7ca6-509b-320f8c4214f7" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "AccountHolderGivenName=Test" -F "AccountHolderFamilyName=User1" -F "AccountHolderDateOfBirth=1900-01-01" -F "AccountHolderIdentificationNumber=19000101-1234-124" -F "AccountHolderContactNumber1=(555) 555-1234" -F "AccountHolderContactNumber2=(555) 555-4321" -F "AccountHolderEmailAddress=test@user.com" -F "AccountHolderAddressLine1=Address 1" -F "AccountHolderAddressLine2=Address 2" -F "AccountHolderAddressLine3=Address 3" -F "AccountHolderPostalCode=1234" "https://bvnk.co:8443/account”
and see if the result is immediate
is the mysql instance on your local pc as well? or in a vagrant box?
oh add a -k flag as well if you are testing locally
Assis Ngolo
@figassis
Aug 16 2016 12:56
yeah, its on my PC. No vagrant box
Kyle Redelinghuys
@ksred
Aug 16 2016 12:57
ok
is the record created in the db?
select * from accounts \G
Assis Ngolo
@figassis
Aug 16 2016 12:58
no, there aren’t even any tables there at all. I just created the main schema. Does the app create the tables or should I create them myself?
Kyle Redelinghuys
@ksred
Aug 16 2016 12:59
you need to create them. you can do so by running the files in sql
for eg: mysql -u USER -p bank < sql/1-xxx.sql
assuming you have created a bank database with a user and associated privileges
ill add this to the README and make a proper installation doc
ill also write a script to help with this
Assis Ngolo
@figassis
Aug 16 2016 13:00
I’m going to write one now
Kyle Redelinghuys
@ksred
Aug 16 2016 13:00
awesome that would be great
Assis Ngolo
@figassis
Aug 16 2016 22:55

Foudn out my setup was hanging because I set mysql host to 120.0.0.1 instead of the loopback. facepalm took me forever. Anyway, done with the sql import script. I placed it in a scripts directory. Eventually I intend to add a single setup script there that will do all the setup.

I setup my repo here, https://github.com/figassis/bank