Jump to content
Sign in to follow this  
Tabula_Rasa

PayPal displays Item # 51{1}1 () instead of item name and options

Recommended Posts

I'd post this in the PayPal WPP post, but I don't think the problem is caused by that. There were some changes made to the core before I got to this project in many of the same files. Most notably, a 'bug fix' across nearly all the checkout pages that affects every instance in which options and attributes are queried and dealt with. Most notably on shopping_cart.php.

 

The result is that PayPal displays, for a test item with pID of 51:

 

Item # 51{1}1 ()

 

rather than the name of the product and the option (size = small) that I am expecting.

 

The Order Process e-mail that's sent back, however, correctly lists the item name and the Option of small for size.

 

My thought: Who cares? You have the order e-mail with the correct items and correct options.attributes, but the client wants it to reflect on PayPal and I don't know where to look.

 

In the PayPal WPP files, I don't see where anything is being built in this way so as to come up with "Item # 51{1}1 ()" and neither do I see where the code might be in order.php or order_process.php.

 

Any ideas on where I should be looking?

 

Thanks. Client is furious that this is being hung up on such a small issue.

Share this post


Link to post
Share on other sites

That is by design due to limitations in PayPal's API. Ideally, the Item number field would look like, "Item# 51" and then the "Options" column would be filled with the selected attributes.

 

Unfortunately, PayPal's API does not give any access to the "Options" column and the Item Name field is too small to store all of the possible attribute names, so the compromise was to store it in osC format in the item #, which is what you see currently.

 

Unless PayPal updates their API, your client will have to deal with it. If it is ever updated, I'll update it in the module. Otherwise you should send out an order email from your store that lists all of that information instead of relying on PayPal's order emails.

 

On the other hand, if it's that much of an inconvenience, he'll need to switch to another payment gateway service.


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites

The option value is stored under item number as an array in osCommerce. So the item# generated here is actually an array, rather than a string (PayPal is expecting a string). An extra function to dump the array and return the item# and option value in a string will sovle the problem.


Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×