andyplak / events-manager-pro-world-pay

WorldPay gateway for WordPress Events Manager
1 stars 0 forks source link

WorldPay gets 406 error from response URL #2

Closed andyplak closed 10 years ago

andyplak commented 10 years ago

HTTP/1.1 406 Not Acceptable Date: Thu, 12 Jun 2014 07:33:47 GMT Server: Apache Content-Length: 226 Connection: close Content-Type: text/html; charset=iso-8859-1

Not Acceptable!

Not Acceptable!

An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.

andyplak commented 10 years ago

So Apache's Mod_Security considers the request to be dubious because of some of the post data. Two options occur to me here. Loosen the Mod_Security rules or switch Payment Response to GET instead of POST.

http://stellify.net/406-not-acceptable-and-apache-mod_security/

From WorldPay docs:

Configuring your server to receive the Payment Message To use the payment response feature you must configure your web server to receive the Payment Message via the POST request method. Due to the number of different Web servers and possible versions available, we cannot provide you with detailed information about how to configure your server to use the POST request method. However, we recommend that you have the latest service packs installed and that your firewall has been enabled for us to connect to your server-side script.

andyplak commented 10 years ago

In my case, Mod_Security rules were taking no effect. Bluehost did not permit such rules on my account. Raised a ticket and they whitelisted me. Now all working as expected.