If you're consistently getting an error when trying to process payments on your site, it's surprisingly easy to troubleshoot. You will just need access to your web files via FTP or your control panel's File Manager.
Applies to Version(s): 3.9.X - Current
In this article, you will learn:
How to Test the Payment Gateway
Questions to Ask
Below are a few questions you want to ask yourself when customers are unable to checkout on your site.
1. Is it affecting everyone?
If it is affecting all of your customers, then there's a good chance the problem is with your gateway or your website. If only one or a few customers are affected, the issue is either because of user error or due to a specific set of circumstances. Try to gather as much information as possible, i.e. browser being used, steps to replicate, etc.
2. How long has the issue been occurring?
Has payment ever worked? Or did it just recently stop working? What may have changed during that time? Are you on a new server? Have any settings been changed?
3. Are there any error messages after trying to run the payment?
If an error message shows details, what do the details tell you about the error? For example, if the error says "Declined", you can pretty much guarantee the problem is with the Card Holder's financial institution. If the problem says something like "Authorization Error", then the problem is likely with the gateway credentials being used. However, if the error is something general, there are some additional steps we can take to find more information.
DEVMODE
Devmode is used in PinnacleCart's config file for troubleshooting a few things. It's most beneficial for troubleshooting shipping and payment methods.
1. Using FTP or your server control panel's File Manager, navigate to the following directory: content>engine.
2. Edit the file named engine_config.php. By default, this file does not contain a line for DEVMODE. For example, the file would look something like this:
<?php define('DB_HOST', 'localhost'); define('DB_USER', 'desertdessert'); define('DB_PASSWORD', 'mystrongpassword'); define('DB_NAME', 'desertdessert_database'); define('DB_PREFIX', ''); define('LICENSE_NUMBER', '1234-55555-6-777777777-d88899'); define('PASSWORD_SALT', '$1234567abcdefgh9987654321');
3. When we turn on DEVMODE, we need to add a new line to the config file which tells the cart that it's on. This line is defined ('DEVMODE',true);. The resulting file would look like this:
<?php define('DB_HOST', 'localhost'); define('DB_USER', 'desertdessert'); define('DB_PASSWORD', 'mystrongpassword'); define('DB_NAME', 'desertdessert_database'); define('DB_PREFIX', ''); define('LICENSE_NUMBER', '1234-55555-6-777777777-d88899'); define('PASSWORD_SALT', '$1234567abcdefgh9987654321'); define('DEVMODE',true);
4. After adding that line, save the file.
Test the Payment Gateway
With DEVMODE now enabled, you will want to try to process a payment. To avoid accidentally charging a large amount to your credit card, you can create a cheap test product to test with.
1. Go to Products & Categories > Add a New Product.
2. Add a test product.
3. For Product Name and Product ID, use Test.
4. For Price, use 0.01 (1 cent).
5. Select a random category and make sure taxes are turned off for this product.
6. Scroll down to Shipping, weight & dimensions and click it to expand the section. Turn on Free shipping for this product.
7. Click Save.
8. Click View on Storefront.
- On the product page, click Add to Cart then proceed to Checkout. Continue until you're on the Checkout page.
- Fill out the form for Billing and Shipping, choose the Gateway we're troubleshooting, and enter a valid credit card number.
- Assuming you are getting the same error that was reported, continue to the next step.
Viewing the Log File
With DEVMODE on, all shipping and payment options, along with some apps will now report errors into a log file.
- Using FTP or your File Manager, navigate to the following directory: content>cache>log.
- You should see a file for the Gateway you're troubleshooting. For example, PayPal Express will produce a file named paypal.txt, Authorize.net will produce a file named payment-authorizenet_aim_3_1.txt, and First Data will be payment-firstdata.txt, so on and so forth. You should also see a timestamp, which should tell you whether the file was updated on your transaction attempt.
- Open the file. Your test transaction should be at or near the bottom.
- What you will see in the log is typically a Request and a Response. The Request is from the PinnacleCart application and the Response is from the Gateway. We are looking for the Response because it will explain what the problem is.
Here is an example:
2016/11/23-19:14:19 - firstdata Request: gateway_id = xxxxxx password = XXXXXXXX transaction_type = 00 amount = 34.99 cc_verification_str1 = 123 E Fake Dr|85282|Tempe|AZ|USA cvd_presence_ind = 1 zip_code = 85281 tax1_amount = 0.00 customer_ref = 59 client_ip = 68.14.248.237 client_email = xxxx@xxxx.com currency_code = USD ecommerce_flag = 7 reference_no = 5 cardholder_name = test test cc_number = XXXXXXXXXXXXXXXX cc_verification_str2 = XXX cc_expiry = 0117 2016/11/23-19:14:19 - firstdata Response: Unauthorized Request. Bad or missing credentials.
This response clearly shows that I don't have First Data set up correctly in the admin area. The credentials are not correct. I should contact First Data and confirm with them what the correct credentials should be.
Not all errors will be clear. Some will simply be an error code. A good rule of thumb is to use a search engine like Google to find error codes along with the Payment Processor name. 9 out of 10, this will show you what the exact problem is.
Links to Related Articles
None at this time.
If you didn't get your question answered, please contact the Pinnacle Cart Support Team. To submit a ticket, go to the My Account drop-down menu at the top right of the admin area and select Support.