Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

We're using the Authorize.net plugin from the osCommerce store and running into an issue with token generation on the hosted payment form.

For certain products, we dynamically generate the itemId based on the product ID and its selected attributes (e.g., size, color, material, etc.). This allows us to track product-variant combinations in our system. However, the resulting itemId string can exceed Authorize.net’s 31-character limit.

When this happens, the token fails to generate, and we get:

"Missing or invalid token"

 Here is the full trace:
"PHP message: E00003: The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:itemId' element is invalid - The value '2301{7}736{9}154{10}176{23}759{24}268' is invalid according to its datatype 'String' - The actual length is greater than the MaxLength value."

We've confirmed this is due to the itemId field being too long. When we shorten it manually to 31 characters or fewer, everything processes correctly.

The issue:

We can’t modify the plugin code from our end.

The plugin currently passes our long itemId values directly into the token request without validation or mapping.

Shortening or removing the attribute data breaks internal product tracking on our side.

What we need:

A plugin update that allows for mapping, sanitizing, or hashing longer itemId strings internally so we can retain tracking without breaking token generation.

Or a hook/filter we can use to intercept and modify itemId values before they are sent in the API request.

Let us know if a patch, override, or workaround is available. We’d be happy to assist with testing.

Thanks in advance!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...