If you are have a website, you likely will have problems arise with your site. If you have an e-commerce site, those problems may impact your ability to do sales. There are no perfect systems, but it is important to understand the errors that are common and expected, as well as signs that an error might be more serious. This section of the FoxyCart E-Commerce Primer for Everybody will focus mainly on errors you will almost definitely see.
The most common type of error that you see will be a gateway error. Gateway errors are, unsurprisingly, errors that come from your payment gateway and not from FoxyCart. (Please read The Pieces if you aren't sure what your gateway is.) This is a critical distinction to make, because it means that the error occurred beyond FoxyCart's control.
For example, you'll get an error from your gateway if
A screenshot of what a gateway error looks like (using the “standard” FoxyCart checkout theme) is at right. These errors display to the customer, and also display in the FoxyCart Admin under the “errors” report.
What to do about gateway errors depends on what the errors actually are, and how many you see. The most important thing to keep in mind though is that the gateway error most likely describes what actually happened. That may sound silly, but we get asked all the time about errors like this:
Error: There was an error processing your payment: (10527 Invalid Data) This transaction cannot be processed. Please enter a valid credit card number and type.
There are two things to do here.
10527error as “The credit card entered is invalid.”
So in this case the error simply means that the card was incorrect. Probably nothing to worry about. If the gateway says it's a bad card number, it's almost assuredly a bad card number.
Let's take another example:
Error: There was an error processing your payment: (10558 Currency Not Supported for Card Type.) Your processor is unable to process the Card Type in the currency requested. Please try another card type.
In this case, Googling finds us this page, explaining that AmEx and Discover cards aren't accepted using a Canadian PayPal Payments Pro. (Oddly enough, that
10558 error isn't on the previously linked PayPal documentation page, but Google to the rescue.)
The gateway errors you see in your store error log will no doubt be different than the examples above, but most likely they will accurate describe errors.
Serious errors would be things like these:
If you see errors that seem to be costing you money and losing you sales you'll want to drop everything to figure out how to get them fixed.
We add a specific note about this error code because it comes up quite often, but is also very generic.
With many gateways, a response code of “2” means that the customer's card issuing bank declined the transaction. Unfortunately, there's nothing else to figure out but that the issuing bank declined it. This is _usually_ because the card has insufficient funds, the card can't be used to make a purchase that big in a given day, the transaction doesn't fit with the normal spending patterns of the customers so it was declined to prevent potential fraud, the card has been temporarily put on hold for fraud concerns, the account was closed, or any other number of reasons. But ultimately the only way to truly discover why it was declined is to have the customer call their bank and ask, since it's their bank that's declining it.
The datafeed is a feature that simply sends an encrypted copy data from your store (whether that be about a successful transaction or some information on upcoming subscriptions) that allows you to perform custom tasks - such as updating inventory, setting user access privledges, communicating with third-party systems like customer management systems, mailing list systems, fulfillment and shipping services, or just entering something into a database for custom reporting. At it's most basic level, when FoxyCart sends the datafeed to your endpoint, it expects a response of 'foxy' back from your server within a certain timeframe. If this doesn't occur, or something other than 'foxy' is received, you'll receive a datafeed error.
See this page for more information on the datafeeds.
The best way to debug a datafeed error is to take a look at the error log listing in your stores FoxyCart administration. Generally, the error log detail will look something like this:
DataFeed Failed: (TRANSACTION_ID) 0000-00-00 00:00:00 ERROR_MESSAGE [HTTP_RESPONSE_CODE]
While not all pieces may be present in a given error message, that is the general makeup. The Transaction ID will be present for all transaction based datafeed failures to show you which transaction it relates to specifically. The error message will generally give you an idea of what exactly went wrong, and where it doesn't, you can glean some specific server based information by the HTTP response code that was returned. If your endpoint fails with an error message of it's own, this will be carried through into the error log in the administration - allowing you to find out what's going wrong easier. For information on HTTP response codes, Wikipedia is your friend.
Page Not Found
DataFeed Failed: (123456) 0000-00-00 00:00:00 No data returned for http://storedomain.com/foxycart/datafeed.php 
The “No data returned” message shows that the endpoint returned nothing, no error message or 'foxy' as it expects. That doesn't necessarily point to an issue straight away, but the HTTP response code of 404 means that while the server was reachable, the specific page was not found. The datafeed endpoint URL would need to be confirmed in the advanced settings page of your stores FoxyCart administration.
DataFeed Failed: (123456) 0000-00-00 00:00:00 Datafeed Returned: <br /> <b>Parse error</b>: syntax error, unexpected '=' in <b>/foxycart/datafeed.php</b> on line <b>16</b><br />
This type of error shows that your endpoint is being reached successfully, but the actual endpoint is breaking somewhere in it's execution. Generally the error message here will be a good indicator of what might be going awry, but for in depth debugging, we recommend doing some local testing with the scripts found here
Taking Too Long
DataFeed Failed: (123456) 0000-00-00 00:00:00 No data returned for http://storedomain.com/foxycart/datafeed.php  Operation timed out after 20000 milliseconds with 0 bytes received
FoxyCart expects to hear back from your server within 20 seconds of the endpoint being sent the datafeed information. If for whatever reason this doesn't happen, then you'll see the above message in your error log. This can relate to either your host, our endpoint script or both. If the host is responding slowly, and for example causing the connection to take 15 seconds to actually establish, that would leave only 5 seconds for the endpoint to receive the datafeed, process it and respond. Alternatively, if your script includes a lot of complex tasks or tasks that take a long time to complete, this can also easily blow out the script time past that 20 seconds. To debug this type of situation, you'll need to find out where the slow down is occuring, and make steps to speed up the process.
For some general suggestions on fixing a datafeed issue, the following might help:
Once you've fixed the issue, or if it was just a temporary issue that has now been rectified, you can resubmit a transactions datafeed by finding the transaction in your stores FoxyCart administration and selecting 'Re-feed it now.' at the bottom of the specific transaction details pane, next to the 'XML Datafeed Status'. For subscription based datafeeds, you can request the datafeed be resent using the API
Any error that occurs on your site itself and not on the FoxyCart-hosted cart, checkout, or receipt, are defined as “site errors”. They might be things like:
Because of the infinite possibilities an error on your site might not even be noticeable unless you know what to look for. If you think something should look or behave differently than it is, that's the best indication.
The first step is figuring out what the problem is, and whom to ask about fixing it. If you are the web professional who developed the site in the first place you probably know what you're doing. If you're a merchant or non-technical store administrator, it may be less clear.
The first rule of thumb is to figure out where the error is occurring. If it's on an aspect of your site that is unrelated to your cart or checkout, it's likely not a FoxyCart-related issue. If it is related to your cart, the best action to take is to check with the web professional(s) who set up your site with FoxyCart, as it still may be an issue with your specific implementation of FoxyCart. For example, a question like this:
Several of our customers today paid for e-books, but when they log back in and go to “My Downloads” to access them, all they see is the free e-books that are available to anyone who logs into our site.
While it may not be clear to a non-technical user, or to a user who didn't set FoxyCart in the first place, FoxyCart doesn't have a customer-facing “My Downloads” section, nor does it have a login area for customers. That indicates that the issue is with a customization or 3rd party integration that this site is using. While we at FoxyCart are happy to point you in the right direction, we can't actually fix the problem for you. If you do have questions though just ask.
Shipping errors occur when a customer's address (as entered on the checkout) doesn't return any shipping options. This generally occurs if a store is using live shipping rates (from UPS, USPS, FedEx, etc.) but hasn't selected enough options. For example, if Ground is the only method selected and a customer attempts to order from a different country or continent (or Alaska or Hawaii) then the customer would see a shipping error like “No Shipping Options Available”.
They can also occur if no options are returned by the shipping carrier, which can happen if the shipping carrier's rate request system is unavailable for any reason (such as scheduled maintenance). Worth noting is that FedEx provides notice of their scheduled maintenance, but UPS does not seem to (at least, not that we've seen). When choosing a shipping carrier you should make sure to ask them whether or not you'll received notice when their rate request system is unavailable for any reason, as the lack of shipping options can prevent a sale.
A screenshot of what a shipping error looks like (using the “standard” FoxyCart checkout theme) is at right. These errors display to the customer, and also display in the FoxyCart Admin under the “errors” report.
Look at your store's shipping setup, ensure that you have chosen the appropriate options, and test to make sure all the countries you would like to serve return rates.
If you're not a web professional, you can ask for help on the FoxyCart forum.
Security Warnings are popups that the browser displays when it loads a secure page (ie. a page over
https instead of
http) that contains insecure elements. An insecure element doesn't necessarily mean it's a bad element, but for security reasons it's not a great thing either way, and the warning can spook potential customers. These errors can and should be fixed.
These warnings most often occur when a customized FoxyCart-powered checkout is not cached properly, or if the template caching functionality isn't used at all (and the checkout template is created manually instead).
A screenshot of what a security warning looks like in Internet Explorer 8 in Windows 7 is at right.
Important to note is that just because you may not be seeing this warning doesn't mean others aren't. Some browsers (Firefox is pictured at right) will display this alert once, and are configured in such a way that the browser will not notify again if “OK” is clicked (and the checkbox is unchecked). Other browsers have a checkbox allowing the user to not show alerts like this in the future. Regardless, the problem is that just because you aren't seeing the alerts doesn't mean that your customers aren't.
If you're not sure whether your checkout has unsecured content you can check in Firefox. Look for the little lock icon. If it has an exclamation mark on it, you need to take action as described below.
If you're getting these warnings on your cart, checkout, or receipt pages you should take a look at the template caching documentation. Using FoxyCart's automatic template caching will generally solve these problems for you automatically. If you have done things manually you can also use FoxyCart's caching functionality manually as well.
If you'd like a little more info about what exactly is loaded by
http instead of
https you can double click the little lock icon in Firefox (pictured at right) to get more info. Click the “Media” tab and look for any asset that starts with
http. When you find the offending elements you can fix them as necessary.