Common Errors Magento 1

First of all, when you face any problems with our module, the best place to look for help first is this page.

 

If you don't find the answer on either places, you can notify us via Zendesk.

What information should my email topic include?

Please be as more specific as possible, attach log files, screenshots, steps to replicate the issue anything relevant to help us solve your problem quickly.

SameSite cookie error

 

Chrome recently launched an update restricting cookies from other sites such as the ones created by SagePay.

In order to solve this,

Magento itself allows to set the cookie path for its cookies, adding the same attributes in there seem to work for as well

In your Magento backend, go to System > Configuration. On the left menu, under General section, click Web.  The Session Cookie Management options have a field for the cookie path.

The first thing is making sure HTTP Only is enabled, the second is adding the following to the cookie path: /;Secure;SameSite=None

See screenshot for reference: 

If the above does not work this can be configured directly on the web server.

 

For apache users just add the following entry in the apache configuration file:

Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=None

 

For nginx users please read the following doc: https://geekflare.com/httponly-secure-cookie-nginx/

For nginx plus users please read the following doc: https://docs.nginx.com/nginx/admin-guide/dynamic-modules/cookie-flag/

 Message not from "trusted origin" 

Add the following policies to your Content security policy header:

script-src:

img-src:

style-src: 

connect-src:  

font-src:

frame-src:

form-action:

4006 INVALID: The TxType requested is not supported on this account.

The TxType field (also called PaymentType in very old protocols) should contain the type of

transaction you wish to perform. Values such as PAYMENT, DEFERRED, REFUND etc. as outlined in

Sage Pay protocols.

If any other value is passed within this field, the Sage Pay system will not be able to identify how

to process the transaction.

The easiest and fastest way to solve this is calling Sage Pay support team, inform them your

vendorname and if you can let them know the txtype you are trying to use, this information can

be found on the log files.

PAYPAL: If you are getting this when using PayPal via Sage Pay, you need to call Sage Pay and ask

the Service Desk team to enable 'Complete' option at the database level.

4020 - Information received from an Invalid IP address

 

One of the most common Sage Pay errors we are asked to solve is the 4020 one.


Actually, this error has nothing to do with the Sage Pay Suite extension, it means that the IP address where the Magento store runs has not been added to the "My Sage Pay" account being used. Most of the times it's pretty easy to solve, just log into your "My Sage Pay" account then go to "Settings -> Valid IPs" and enter your server's IP address.


If you are unsure what your server's IP address is or Sage Pay is still refusing your IP address you can follow a few easy steps in order to get the exact IP address Sage Pay is being contacted from:


1- Get yourself a free Sage Pay Simulator account here.  (or enter our simulator vendorname which is ebizmartssp)

2- Go to your Magento Admin site, then goto System->Configuration->Sales ->Sage Pay->Sage Pay Suite [Global] and set "Vendor" to your Simulator vendor 

3- Then set the Sage Pay Suite extension to "Simulator" Mode, you can do this either in "Sage Pay Suite [SERVER Integration]" or "Sage Pay Suite [DIRECT Integration]" section 

4- Save settings and the refresh cache 

5- Try a new order, you'll still get the 4020 error, but this time Sage Pay will echo back the IP address


If you still experience issues you'll have to email Sage Pay support, include your vendor name, and a screenshot of the alert box showing the 4020 error and the IP address returned by Sage Pay.

5006 - Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL.

 

This is a wildcard error message, it could mean a lot of things but here are a few common issues that might lead to this.

- A firewall is not letting Sage Pay POST information to Magento

- The site is in maintenance mode and restricted only to some ip addresses or any kind of restriction

- Site is protected with username and password not letting people viewing it unless they enter the correct information. On this one it can be bypassed if you only filter GET requests, more information here.

- An error in Magento is happening when the POST data reaches our controller, before or after.

- SSL 3.0 is enabled, Sage Pay does not reach servers that are using SSL 3.0.

 

We've also had reports that the module MageCom_ReCaptcha causes the error.


Payment has failed, please reload checkout page and try again. Your card has not been charged.

 

If you are using the Magento default checkout, this error is usually related to adding minified jquery files during checkout. Try removing those from your checkout layout XML.

 

If you are not using the Magento default checkout there may be compatibility issues, please note that our module is only compatible with onestepcheckout.com OSC Extension, we cannot assure you our module will work correctly with a different extension.

 

This issue can also be caused by having symlinks disabled. Since patch SUPEE-9767v2 has disabled and removed the option in "Advanced -> Developer -> Template settings", that would allow us to enable/disable symlinks. You can check HERE how to enable symlinks.


Session Validation Settings

 

Our integrations require the setting "Use SID in frontend" to be Yes otherwise callbacks may fail and the module won't work properly. This setting can be found under System > Configuration > GENERAL > Web.

Also, if you are using SERVER integration you have to set "Validate HTTP_USER_AGENT" to No.


When clicking on Place Order throws a 500 error or it dies

Something is broken behind the scenes, open up index.php and uncomment

ini_set('display_errors', 1);

also, add this line

Mage::setIsDeveloperMode(true);

Try again and the error should show, either on alert box or using a XHR inspector such as Firebug

The module could not create the necessary tables on setup

This can happen without any clear reason, it happens in very little occasions but when it does tables have to be created manually by running MySQL queries. You should run the attached file named "queries.sql" on your database, make a backup before you do. Keep in mind that if you are using table prefixes you have to add the prefix on every CREATE TABLE statement on the attached file.


Error 4028 : The related transaction cannot be found.

If this happens when you try to REPEAT a payment, it is because the original payment is no longer an active transaction as it was cancelled by the vendor. The gateway can only allow Repeat payments made against successful complete transactions.


"Page NOT found" appears behind SERVER iframe in IE10

This problem is caused by an IE10 BUG for which you can find details here.


SERVER iframe not showing

If you are using Twitter Bootstrap the problem is probably caused because the "modal" css settings in the bootstrap.css file are overriding our settings.

If you are not using bootstrap modals then you can remove all the "modal" settings in the bootstrap.css file to fix this.


Google Universal Analytics reporting incorrect referral URL

 

To avoid getting SagePay internal URLs on your GA referrals you'll need to add their domains to the exclusion list as follows:

Clearing TEST orders

If you clear Magento's orders for some reason, you should also delete -backup first- related data from these tables:


Server, Auth&Cap and Save Order Before disabled 

Fatal error: Call to a member function getMethod() on boolean in...

 

Session OrderId being lost when trying to invoice order with Auth&Cap

Customer are experiencing problems because the session is getting lost and this does not allow the module to invoice the order while using Authorize and Capture.

Both reports received were using Server, Auth&Cap and Save Order Before disabled. I've not received reports from another integration or with Save Order Before enabled, yet.

 

Solution: Set both params to "Yes" as indicated in image below: