I tried a test payment with ogone, I got the following error form ogone "Invalid ItemID field length: "payment_commerce_9835" (21 MIN : 0 MAX : 15)". This value came form line item's name, I don't know which exactly generate this name, maybe the commerce_payment module, because at the moment I use the payment and commerce payment module at the same site.

In my situation this value is too long for ogone, so I set a new variable for this param.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

segi’s picture

I attached the patch.

Xano’s picture

Status: Active » Needs work

Good catch! The Ogone parameter cookbook says the value must be alphanumeric with a maximum length of 15 characters. A colon is not alphanumeric, so what we can do is use an x as separator?
Also, what is this value used for within Ogone? Is it even required by the API?

Xano’s picture

Bump.

segi’s picture

Sorry for late, I was a little busy.
I checked order without ITEM ID and it seems to me it works, but I think this is not an unnecessary property, it is proper for identify the product. I modified the patch based on your suggestion and toke a X instead of underscore.
So, feel free, you decided the ITEM ID is necessary or not, but at the moment it doesn't work.

segi’s picture

Issue summary: View changes
FileSize
758 bytes
segi’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: ogone-item_id_too_long-2109153-4.patch, failed testing.

The last submitted patch, 5: ogone-item_id_too_long-2109153-4.patch, failed testing.

segi’s picture

Sorry, I fixed the last patch.

segi’s picture

Status: Needs work » Needs review
Xano’s picture

Status: Needs review » Fixed

I checked the manual again, and 15 characters should be enough to contain the payment ID and the line item's number. Assuming there will be no more than 99 line items for a payment, this allows your solution to process a trillion payments through the same Ogone account, before things might go wrong.

Committed and pushed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.