I’m using PayPal Standard, and the payments are completing ok, but the orders remain as “Processing”, and the error message field says “FAILED: Could not verify that the payment notification coming from PayPal was received correctly.”
In the log files, there is a message as follows, which I presume is the reason the orders are not being updated:
1. In your cartthrob > payment gateways > payment security settings, turn off “Allow gateway selection in checkout form”
2. Set “encode gateway parameter in checkout form” to “no”
The automatically generated URI will then just be paypal_standard instead of all of that gibberish (which is currently causing the problem). It won’t affect security by making this change in your particular implementation.
Yes, but I tried doing an order on a new install of EE without without any other plugins or modules, and without using htaccess to remove index.php, and the same issue occurred. The orders are being updated with a transaction id, but they remain as processing, and they contain the error message “FAILED: Could not verify that the payment notification coming from Paypal was received correctly.”
For PayPal, I have auto return on, the return url set to the site homepage, payment data transfer on, and IPN enabled, again using the site homepage url. Is there anything else that Im missing?
I also tried a different PayPal account in case that was the issue.
I’ll PM you the site details so you can take a look.
I tried installing the latest version of Cartthrob on a new EE install, and the same issue occurred. However, a colleague gave me access to another site running an older version of Cartthrob with paypal standard, and when I installed that, the transactions completed fine. The version I tried was .9418.
I tried using the latest available, version 0.9516, but the same problem still occurs. You mentioned that you thought you know what the problem, so would you able to let me know, where you think the issue is. Is it just within the payment gateway file?
Ah, I finally managed to figure out what’s going on… took me awhile. I thought EE was reporting an invalid request URI… what it’s actually reporting is that the data sent from PayPal is INVALID (can’t be verified). So… we need to worry about the data coming in from PayPal and why it’s not being verified. Generally this would happen
1. if $_POST data is not being sent to the URL from PayPal(if it’s being visited manually),
2. if the data is corrupted between the time that PayPal sends it, and its sent back to PayPal
There are a few things to look for in the log files, namely: paypal post-$key: $item. The URI should be something more like:
There is some code in the PayPal standard payment gateway that is commented out. in the following code in that file, remove the opening /* and the closing */
/*if ($this->plugin_settings['log_errors']== "yes") { if ($logfile = fopen("../paypal_problems.log", "a")) { fwrite($logfile, sprintf("\r%s:- %s",date("D M j G:i:s T Y"), $_SERVER["REQUEST_URI"] )); foreach ($_POST as $key=>$item) { fwrite($logfile, sprintf("\r%s:- %s",date("D M j G:i:s T Y"), "pp". $key ." : " . $item ));
} fwrite($logfile, sprintf("\r%s:- %s",date("D M j G:i:s T Y"), $data )); } }*/
We’ll see if we can get your system to write out detailed log files of the data coming in, and being sent back to PayPal.