View Issue Details

IDProjectCategoryView StatusLast Update
0007797module PayPal Checkoutmodule PayPal checkout - subpublic2025-06-10 13:18
ReporterSpritje Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version2.5.3 
Summary0007797: For article title (length greater than 128) payment is not possible
DescriptionIf the item title is longer than 128 characters, it is not possible to pay via PP. The order has the internal status ‘ERROR’.

PayPal Log
[2025-05-02 09:44:17] PayPal Payment Logger.ERROR: Error on order patch call. ["[object] (OxidSolutionCatalysts\\PayPalApi\\Exception\\ApiException(code: 400): PATCH https://api.paypal.com/v2/checkout/orders/5CX72941A0079274L returned: 400 Bad Request\nReturned Message: Request is not well-formed, syntactically incorrect, or violates schema.\nError Details: \n[{\‘field\’:\‘\\/items\\/2\\/name\’,\‘value\’:\‘notched trowel \\/ notched trowel | 280 x 130 mm, blade thickness 0.7 mm (swan "standard"), rectangular toothing 4 x 4 mm | steel | soft handle\’,\‘location\’: \‘body\’,\‘issue\’:\‘INVALID_STRING_LENGTH\’,\‘description\’:\"The value of a field is either too short or too long. \"}]

Article title length of PayPal is fixed to String[128].
Steps To Reproduce1. Create Article
    Zahnkelle / Zahnspachtel | 280 x 130 mm, Blattstärke 0,7 mm (Schwan "Standard") Rechteck-Zahnung 4 x 4 mm | Stahl | Holzheft
    -> 124 characters
2. Try to by article via PayPal

-> HTML entities are used in the request to PayPal and therefore the permitted length String[128] is exceeded (" becomes HTML Entität("))
-> See PP Log attached
TagsNo tags attached.

Relationships

related to 0007780 resolvedMark.Schuette If Article Description is too long < 128 caracters -> you Paypal Payment is not possible 

Activities

QA

2025-05-14 12:37

administrator   ~0017949

paypal_1.jpg (111,194 bytes)   
paypal_1.jpg (111,194 bytes)   

williamclark

2025-05-15 09:24

reporter   ~0017954

The problem occurs because PayPal has a hard restriction of 128 characters for item titles, and when we encode HTML entities like quotes (`"`) as that looks like (`"`), it counts as a character, and would exceed the 128 character limit despite the original string being under 128 characters. This causes a 400 Bad Request with INVALID_STRING_LENGTH error code. The solution is to truncate or sanitize item names prior to sending that to PayPal, and make sure that when we account for encoding, the total number of characters is still under the limit. Consider having your checkout integration either check before encoding, or auto-truncate or something similar.