View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007797 | module PayPal Checkout | module PayPal checkout - sub | public | 2025-05-14 09:54 | 2025-06-10 13:18 |
Reporter | Spritje | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | acknowledged | Resolution | open | ||
Product Version | 2.5.3 | ||||
Summary | 0007797: For article title (length greater than 128) payment is not possible | ||||
Description | If 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 Reproduce | 1. 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 | ||||
Tags | No tags attached. | ||||
related to | 0007780 | resolved | If Article Description is too long < 128 caracters -> you Paypal Payment is not possible |
|
|
|
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. |