Observer: FG Admin Updates

The user story goes something like this: “As an admin, I want updates to FinanceGenius LOS admin settings to propagate to the customer-facing LoanappGenius portal so loans funnel in seamlessly”. “Let’s use the observer pattern,” the developer said.

Some of the work was already done by a previously mentioned contractor. The problem was that none of it was working. We spent a good deal of time reading over sparsely-commented and poorly-planned code. The vendor was not available for questions, so we had to interpret the original intent and diagnose the problems. We had to poke at it a lot.

Once we established communication from FG back to LoanappGenius, it was quite the spinning plates situation with (now) back-and-forth requests between our PHP Laravel, Python Flask, and PHP Codeigniter environments, though debugging the issues then became easier. We found and dealt with several issues:

  1. fix broken Oauth
  2. send FG admin settings to LoanappGenius just after updating, and if communication failed, adding them to a cron DB table to be tried again later
  3. improve architecture
  4. improve readability