I am just a little curious. What can I do to make my debugging experience with payment gateways a little easier. On check out, it always does the ajax calls. So there is no way I can print_r() or echo to see the progression. Is there a easier way to do it without destroying nothing. Is it possible to disable the ajax calls and make a regular post.
Share
Short answer is: Do this for non-destructive debugging.
Long answer follows.
I haven’t done a ton of payement gateway debugging, but many of the payment gateways have a “debug” setting in
Check the authorize.net option group for an example of this. If you flip this to the “yes” position debug information will start spewing to the log file. This assumes you’ve turned logging on in
You may need to create the log files yourself in
Make sure these files are writable by your web server.
You can also log to these files yourself with the static
method call.
Finally, if your payment gateway doesn’t have a debug setting, you could always fake it. All Payment Model (are supposed to) inherit from the following class
This class has a method that determines if debugging is on or off
If there’s no debug config flag available, you could temporarily change this method to always return true
However, I’m not sure how much debugging the base classes do (meaning if there’s no debug flag in the config, that may be because there’s no debugging going on in the payment gateway model itself). Worth exploring though.
Good luck!