Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Tabula_Rasa

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.

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...