osC's standard PayPal module does not include this line, which appears to be essential to the handshake working right between osC and PayPal.
tep_draw_hidden_field('rm', 2) .
See the attachment for installation details. It may be applicable also to PayPalIPN, but I've not gone there yet.
I'm guessing PayPal introduced this after 2.2 was released. It's covered in PayPal's installation guide, but what a needle-in-haystack for me to find in the Forum!
Credit for the find belongs to forum user TFO, whose profile is blank, so I can't acknowledge him/her by name.
My first contrib, so be sure to do your backup!
Legend: 
Download

Report
Full package - consists of the working contributions and the upgrades, from the ones listed below. Thanks for this great post.
http://www.oscommerce.com/community/contributions,1153
I am using it for two months now, this is a good contribution. No file attached. Use the contributions posted by Carine Bruyndoncx, and the upgrades by Panda.Nl and kgamadia.
This contribution does not solve the problem. I have tested and unless the customer clicks on "Return to Merchant" on the last page of the paypal payment process, you will still get the payment but not the order
if this code is installed incase they dont click the return to merchant button, will the order be passed twice to the admin if you put this in and also have a return url set up at paypal?
NO NEW FILE UPLOADED
Responding to the previous question - this fixes the problem where a customer has to click "return to vendor" after paying, or the order doesn't show up in osCommerce (though the money is sent), requiring the vendor to contact the customer and ask what the order was. With this one-line edit, the customer is just taken back to the osCommerce site.
Thanks a billion for this contribution!
(uploaded file contains no changes)
No change to the previous posting, but a question. What does the problem look like that requires this fix? I have been getting blank orders in my admin panel from customers using paypal. It seems quite random and Im wondering if your patch is a fix for this problem or is it for something else. If you can please elaborate a little bit about what this fixes?
osC's standard PayPal module does not include this line, which appears to be essential to the handshake working right between osC and PayPal.
tep_draw_hidden_field('rm', 2) .
See the attachment for installation details. It may be applicable also to PayPalIPN, but I've not gone there yet.
I'm guessing PayPal introduced this after 2.2 was released. It's covered in PayPal's installation guide, but what a needle-in-haystack for me to find in the Forum!
Credit for the find belongs to forum user TFO, whose profile is blank, so I can't acknowledge him/her by name.
My first contrib, so be sure to do your backup!