I will give it a try without urlencode().
For the sake of clarity, I wanted to point out that although the PayPal doc provides several payment gateways, I believe the one that relates to me here is under this heading https://developer.paypal.com/docs/classic/payflow/integration-guide/#paypal-credit-card-transaction-request-parameters
Under that heading, it mentions that the L_NAME has a limit of 36 characters. The substr(), has 127 set for length. Would that cause any issues? I assume not since PayPal will most likely just ignore everything after 36 but I wasn't sure.
The L_DESC however, doesn't mention a character limit. That might be an omission on their part but it would be better if I could get the L_DESC to work since I need more than 36 characters to include size and color.
Also, can I just comment out the line for L_SKU, without causing an error, since they say it's optional and we don't really want that showing?
I am going to try and check with PayPal on some of this but it's not easy getting help from them. They direct you to forums instead and I can't seem to find anyone else who has had this issue.