Documentation You are here: start » primer » errors

Errors, and What To Do About Them

If you 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.

Gateway Errors

What They Are

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

  • the customer enters the wrong card number,
  • the gateway's fraud controls rejected the transaction,
  • the customer's bank reported that there were insufficient funds,
  • the store's gateway settings are inproperly entered1),
  • or a variety of other reasons.

What They Look Like

What a gateway error looks like using the "standard" FoxyCart checkout theme. 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 Them

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.

  1. Read the error. It says “Please enter a valid credit card number”, so very likely the error indicates that the card number entered by the customer was incorrect.
  2. Google the error code (the number you see) with the name of your payment gateway. We find this page at PayPal which describes a 10527 error as “The credit card entered is invalid.”
  3. Change your gateway settings or your site as needed.
  4. Contact your gateway or FoxyCart if you're confused.

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 accurately describe errors.

What Might Be Serious

Serious errors would be things like these:

  • Error: There was an error processing your credit card: The merchant login ID or password is invalid or the account is inactive. (Response Reason Code: 13).
  • Cannot find tid for this merchant.
  • AVS errors that seem to be occurring all the time or more frequently than expected.

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.

What about Code 2?

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.

Datafeed Errors

What They Are

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.

An important thing to note with datafeed errors is that although the datafeed failed to process for the relevant transaction, the actual transaction itself still would have processed successfully, meaning that the customer would have still seen their receipt (although they may not have received a receipt email if you're sending that from your datafeed endpoint), and the customer would have been successfully charged for their order. On the other side though, part or all of the functionality in your datafeed endpoint may not have completed successfully.

What They Look Like

You can find out about a datafeed error in a few different ways:

  1. The store administration emails will receive an email letting them know that a datafeed failed to process successfully for the store, and to check the error log for specific details.
  2. If the datafeed was for a transaction, then that transaction listing in the transactions report will be highlighted red to note it's datafeed wasn't sent successfully.
  3. The error log will list the details of the failure as it knows it.

What To Do About Them

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.

Some common error messages

Page Not Found

DataFeed Failed: (123456) 0000-00-00 00:00:00 No data returned for http://storedomain.com/foxycart/datafeed.php [404]

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.

Endpoint Error

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 its 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 [100] 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.

General debugging

For some general suggestions on fixing a datafeed issue, the following might help:

  • If your datafeed is hosted by someone other than yourself, for example if you're using a hosted CMS or a third-party service as your datafeed endpoint, your ability to actually debug errors can be limited. In these instances your best bet would be to contact the third-party with your error details to ask them to see if they can see anything awry.
  • If you've confirmed that the script itself is fine, or that the HTTP response code points to an issue with the host, you'll need to reach out to your hosting provider to ensure that there isn't anything there blocking the ability for FoxyCart to communicate with your endpoint.
  • For debugging your script yourself, we definitely recommend debugging locally by manually submitting a datafeed to it and checking for errors and responses. You can do that using the scripts found here. Also, see this page for more information about testing the datafeeds.

Resubmitting a failed datafeed

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

"Site" Errors

What They Are

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:

  • An add-to-cart link or form not behaving as it should.
  • A slideshow not working.
  • Your template being formatted incorrectly.
  • Incorrect product images, prices, text, or other pieces of content as displayed.
  • Users having trouble logging into your (non-FoxyCart) system.

What They Look 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.

What To Do About Them

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

What They Are

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 receive notice when their rate request system is unavailable for any reason, as the lack of shipping options can prevent a sale.

What They Look Like

What a shipping error looks like using the "standard" FoxyCart checkout theme. 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.

What To Do About Them

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.

JavaScript Errors

What They Are

JavaScript errors can occur for a variety of reasons, often completely unrelated to FoxyCart. Sometimes they can be harmless, but if you are seeing odd behavior or customers are reporting that they can't click checkout you may have a javascript error.

What They Look Like

What a javascript error looks like in Internet Explorer 8 in Windows 7. A screenshot of what a javascript error looks like in Internet Explorer 8 in Windows 7 is at right.

It is important to note, however, that a javascript error might not necessarily be visible or obvious. Often, an unseen error on pageload can create problems with behavior well after the page has loaded.

What To Do About Them

If you're a web professional, you should get Firebug for Firefox and familiarize yourself with Firebug's “Console”.

If you're not a web professional, you can ask for help on the FoxyCart forum.

Security Warning

What They Are

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.

What a security warning looks like in Internet Explorer 8 in Windows 7. 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).

What They Look Like

A screenshot of what a security warning looks like in Internet Explorer 8 in Windows 7 is at right.

The Firefox insecure content warning.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.

What To Do About Them

The "broken lock" indication in Firefox, displayed regardless of security settings. 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.

1) We actually see this one a lot.

Site Tools