Jump to content

Worldpay "Old Gateway" Callback 500 Error


Recommended Posts

I am running 1.7.2.4  instance and installed the Prestashop WorldPay Module to integrate with that service:

In Test Mode and using the REST API the process of transaction works without issue: upon submission the transaction against Worldpay works, the call back is fine and the order completes successfully.

In Gateway mode, this is not successful. Working with Worldpay we have determined a potential problem with the validation.php script which results in a Server Internal Error (500) which ultimately results in a call back fail:

POST /modules/worldpay/validation.php?msgType=authResult&installation=XXXXXX HTTP/1.0
Content-Length: 836
Host: www.essexmason.co.uk
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
User-Agent: WJHRO/1.0 (WorldPay Java HTTP Request Object)
country=GB&authCost=36.00&msgType=authResult&routeKey=VISA_CREDIT-SSL&transId=3084100309&countryMatch=S&rawAuthMessage=cardbe.msg.authorised&authCurrency=GBP&charenc=UTF-8&compName=COMPANY+NAME&rawAuthCode=A&amountString=%26%23163%3B36.00&installation=XXXXXXX&currency=GBP&tel=&fax=&lang=en&countryString=United+Kingdom&email=test12345%40test.com&transStatus=Y&_SP.charEnc=UTF-8&amount=36.00&address=Worldpay&transTime=1512999187664&cost=36.00&town=&address3=&address2=&address1=&cartId=64&postcode=Cb40we&ipAddress=192.168.14.62&cardType=Visa&authAmount=36.00&MC_callback=https%3A%2F%2Fwww.oursite%2Fmodules%2Fworldpay%2Fvalidation.php&authMode=A&instId=XXXXXXX&displayAddress=Worldpay&AAV=00000&testMode=100&name=Test+Test&callbackPW=XXXXXXXXXXXXXXXXXXX&region=&AVS=2111&desc=&authAmountString=%26%23163%3B36.00

 

with the response:

HTTP/1.1 500 Internal Server Error
Server: nginx
Date: Mon, 11 Dec 2017 13:32:59 GMT
Content-Type: text/html; charset=utf-8
Connection: close
X-Powered-By: PHP/5.6.32
MS-Author-Via: DAV
 

Anbody have a similar experience or understand what is going on here.

Thanks 

Paul

Link to comment
Share on other sites

Error logs show:

[Tue Dec 12 14:54:10.664725 2017] [proxy_fcgi:error] [pid 40068:tid 140275619940096] [client 195.x.x.x:38918] AH01071: Got error 'PHP message: PHP Fatal error:  Class 'psworldpay' not found in /var/www/vhosts/domain/httpdocs/modules/worldpay/validation.php on line 32\n'
[Tue Dec 12 14:54:10.892251 2017] [proxy_fcgi:error] [pid 40068:tid 140275536013056] [client 82.x.x.x:38920] AH01071: Got error 'Primary script unknown\n', referer: https://secure-test.streamline-esolutions.com/jsp/test/shopper/CardSTSimulator.jsp
 

Link to comment
Share on other sites

  • 1 month later...

So, I hope it will be useful to someone to post the result of this issue.

The root cause turned out to be a password issue. When I generate passwords I create a 20-25 character hashes. By copying and pasting this against the Module within the Prestashop instance and then again on the WorldPay Servers, it was assumed that they would be accepted in full. In fact, there is criteria and no validation to what is entered. In the case of one of the password fields, what is entered is truncated (although not sure if it was the module or WorldPay that has the shorter field) and therefore the passwords will not match.

Seems simple with hindsight, but it confounded everyone for a month.

I have requested the documentation to be updated to ensure the password length and style be known for that field.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...