Wednesday, March 25, 2009

Payments Payments Payments

I recently was called into my boss’s office to review an issue that was being reported by our website in the error log.  Upon reviewing the code I was reminded of a change our “software architect” made to conform to what he felt was best as far as the naming of things.

Queue Problems.

The architect checked in the broken code which happened to break the interface in our Payment Service and didn’t even take the time up update the service reference in our main business object library.  This check-in breaks every unit test associated with ordering.  Now this in and of itself wasn’t too bad, I updated the service reference which regenerated the proxy objects and had to restructure some code to conform to the new standard.

Fast forward 6 weeks to today when we review that credit card declines are on the rise and errors are being generated left and right due to some of these changes.

Here’s the crux of the matter.  We use an outdated method of a Payment Type and a Payment Method to determine how to authorize payments because an old payment authorizer authored by a 3rd party years ago used to use.  Over the years we have completely phased out this system in favor of a new .Net platform but this system of Type and Method persist. 

What’s the problem with this design?  Nothing from the outside until you look at how we authorize payments globally.  For any given currency we have 1 authorizer.  In the US it is SuperCharge in Europe it is Bibit and that is it.  These elements can be inferred either by Currency or by Country of origination either way both Type and Method can be deemed useless.

Why is this persisted into code that was created 6 weeks ago?  No clue.  Analysis of business practices should persist across any project irregardless of when the original design was created. 

Chances are the original design was bad back when it was created and only a fraction of the “super-awesome-system-to-beat-all-systems” is used anyway.  This leads me to wonder if a fresh eye on a design periodically should be done to assure code smell is reduced.

If i were to give a letter grade on this project it’d get an F for failure to think.  Ugh.

0 comments: