bigbird_3156 Posted April 7, 2016 Share Posted April 7, 2016 Hello, I have created a functioning Credit card payment module through my banks payment gateway that works well. What I am having trouble with is when a transaction does not work and the user gets given an error code. at present I have a set up that through a bunch of "if" statements generates an on screen message appropriate to the error and generates an email record of this error that is emailed to the customer and to the store (if appropriate) I would like to change this for a database based system rather than the hard coded if statement system I currently have. Does anyone know of a payment module that would already has a function like this that I can use as a guideline on how to do such a thing? Quote Link to comment Share on other sites More sharing options...
MrPhil Posted April 8, 2016 Share Posted April 8, 2016 What are you hoping to gain by this changeover? Remember... whether you have a bunch of if-then-elses (or a switch statement), or you look up an error message in a database, someone (you?) still has to enter all this information. Whether it's into PHP code or into a database record is irrelevant. If the error codes and associated messages are changing constantly, a database might make it easier to maintain, but if not, I don't see any advantage. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.