At the bottom of module file is a switch statement that tests the a.net response. There is no default case. I had (well, still am having) a problem where the response value is none of the specific cases for which the switch tests. This gave users the appearance that their purchase was successful, even though I received no money. While the actual problem will almost certainly turn out to be something I'm doing wrong, not having a default case for this test is dangerous and misleading.

I added a default case that displays a generic message, so the user at least knows something went wrong. Patch attached, it also includees my one-line change from the "recurring" issue I posted a while back.

As always, thanks for all the work you put into Drupal E-Commerce!

CommentFileSizeAuthor
default_case.patch821 bytesbpirkle

Comments

davea’s picture

In the latest dev version, this is now an if statement. The positive of the *if* is a non-error response. Anything else is an error.

davea’s picture

Status: Active » Closed (fixed)

closed