Your account is limited to posting only in the Pre-Sales Questions forum.
Support forum access is limited to members with a purchase history.

If you are working on behalf of another member, please contact us with the name of the license holder and we will upgrade your account.
   
1 of 2
1
Paypal: Invalid Request URI
Posted: 17 May 2011 09:55 AM   [ Ignore ]
Wallflower
Rank
Total Posts:  12
Joined  2011-05-05

Hi,

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:

“paypal: invalid request URI:  /?ACT=31&gateway=VRAcPp8b0hHGdf318UcpkWOYgN4T/+/enYoMgJKajQw=&method=paypal_incoming_payment”

The URI looks correct, and I have tried disabling the htaccess file but that doesn’t seem to change anything.

Any ideas as to how this can be fixed? I’m using the latest version of Carttrhob - 0.9516.

[ Edited: 17 June 2011 11:25 AM by Rob Sanchez ]
Profile
 
 
Posted: 17 May 2011 11:31 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

How many gateways are you using? Just PayPal?

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 17 May 2011 11:45 AM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  12
Joined  2011-05-05

Yes, just PayPal Standard. I have tried using another PayPal account and the same issue occurs.

Profile
 
 
Posted: 17 May 2011 11:52 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

I’d suggest adjusting your security settings.

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.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 17 May 2011 12:49 PM   [ Ignore ]   [ # 4 ]
Wallflower
Rank
Total Posts:  12
Joined  2011-05-05

I had the Allow Gateway Selection set to no, but I tried setting the encode gateway parameter to no, but the same issue occurred:

“paypal: invalid request URI: /?ACT=31&gateway=paypal_standard&method=paypal_incoming_payment”

Is the method value correct, or should this be paypal_success?

Profile
 
 
Posted: 17 May 2011 04:31 PM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRank
Total Posts:  3369
Joined  2009-05-29

Are you using htaccess to remove index.php? Can yuo post your htaccesS?

Profile
 
 
Posted: 17 May 2011 08:25 PM   [ Ignore ]   [ # 6 ]
Wallflower
Rank
Total Posts:  12
Joined  2011-05-05

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.

Profile
 
 
Posted: 19 May 2011 12:11 PM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

The invalid request URI is odd. I don’t see why that should be happening.

We’ll need to login to figure out what’s going on here.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 19 May 2011 08:44 PM   [ Ignore ]   [ # 8 ]
Wallflower
Rank
Total Posts:  12
Joined  2011-05-05

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.

Profile
 
 
Posted: 19 May 2011 10:04 PM   [ Ignore ]   [ # 9 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

I believe I made a fix for this earlier today. Should release it tomorrow.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 20 May 2011 12:28 PM   [ Ignore ]   [ # 10 ]
Wallflower
Rank
Total Posts:  12
Joined  2011-05-05

Thanks Chris. Much appreciated.

Profile
 
 
Posted: 01 June 2011 12:10 PM   [ Ignore ]   [ # 11 ]
Wallflower
Rank
Total Posts:  12
Joined  2011-05-05

Hi Chris,

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?

Thanks,
Alan

Profile
 
 
Posted: 03 June 2011 03:22 AM   [ Ignore ]   [ # 12 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

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:

/?ACT=31&gateway=paypal_standard&method=paypal_incoming_payment&invoice=asdf&txn_id=asdf&name=joe+schmoe&etc=whatever

It shouldn’t just cut off after paypal_incoming_payment… it should contain additional query string variables. Hm.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 07 June 2011 10:47 AM   [ Ignore ]   [ # 13 ]
Wallflower
Rank
Total Posts:  12
Joined  2011-05-05

Hi Chris,

Sorry for the delay getting back. The log file entries start as follows:

paypal post-ACT: 31
paypal post-gateway: paypal_standard
paypal post-method: paypal_incoming_payment
paypal post-cmd: _notify-validate
paypal server: https://www.paypal.com/cgi-bin/webscr
paypal result: INVALID
paypal: invalid request URI: /?ACT=31&gateway=paypal_standard&method=paypal_incoming_payment
paypal: invalid
paypal: failed
paypal: exit

Most of the other settings seem ok, and include the following:

paypal post-payment_status: Completed
gateway - paypal_standard
method - paypal_incoming_payment
paypal incoming payment activated
paypal: save_orders
payment_status - Completed

I’ll PM you a full copy of the file in case you can spot anything.

Profile
 
 
Posted: 10 June 2011 02:00 AM   [ Ignore ]   [ # 14 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

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.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 10 June 2011 02:04 AM   [ Ignore ]   [ # 15 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

What version of PHP do you have on your server?

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
   
1 of 2
1