Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#9 | ogone-item_id_too_long-2109153-5.patch | 748 bytes | segi |
Comments
Comment #1
segi CreditAttribution: segi commentedI attached the patch.
Comment #2
XanoGood 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?
Comment #3
XanoBump.
Comment #4
segi CreditAttribution: segi commentedSorry 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.
Comment #5
segi CreditAttribution: segi commentedComment #6
segi CreditAttribution: segi commentedComment #9
segi CreditAttribution: segi commentedSorry, I fixed the last patch.
Comment #10
segi CreditAttribution: segi commentedComment #11
XanoI 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!