Today I was fixing a credit card gateway issue with someones website.
What seemed to be the case was that a cart system was purchased, and just on the fly someone decided to break away one of the existing payment modules and slap something together which would work with eWay.
The system was passed back to them in ‘apparently’ working condition.
When I looked at it today, I was surprised that such sloppy coding existed.
I saw an SQL query formed, referencing a nonexistent array (as in, no array was created whatsoever on that page). This problem was producing 500 errors for customers, and whilst the system was happily charging the credit cards, the SQL query formed after it was broken, so orders weren’t getting marked as paid.
The array not existing at all, but being referenced suggested that they had ported code from a previous module, which did include the array, and simply didn’t error handle or even test this (an array which isn’t declared throws a types exception when it doesn’t exist).
So, the fix naturally was to adjust the SQL query to suit the situation and get that live, but I can see immediately that most of the cart is a mess from what I’ll call ‘chop coding’ – rather than develop the solution properly, buy someone elses and chop and slice til it works and the customer pays up (princely too, $3000+ for crap).
Lately I’ve been keeping occupied with finishing a project. You know, each time I get near that “it’s gotta be done” point, I find there is a little more to go. Still need to draft up some good old content pages for this, and then get some more behind the scenes stuff done. Then I can probably call it “Done” and set it live.
I could have it done tomorrow, thinking of it tonight, but when you hit that favourite stage, known as testing, you generally do find something needs to be fixed up and corrected so it performs nicely. It’s all part of the fun of creation though. Look at it, if it’s still not right, go back and fix it, repeat until satisfied.
I’m sort of excited to some extent. I want to see how it will go, but, I also want to make sure it’s done right, and done well to ensure that we don’t have any hiccups.
It’s taken a bit of time, but it is enjoyable at the same time. It’s something I can enjoy putting together, and something that will work well.