Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.15
-
Fix Version/s: 4.7.16
-
Component/s: CiviContribute
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:No
Description
For a PayPal transaction, CiviCRM truncates the item title to 24 characters when it passes the title to PayPal, but that field can be up to 127 characters according to the PayPal docs.
It happens because in CRM/Core/Payment.php, the function getPaymentDescription is declared with a default length field of 24 characters, and in CRM/Core/Payment/PayPalImpl.php, it is called without passing in a length.
The fix is to add the length to the call, i.e., change line 837 of PayPalImpl.php to
{{ 'item_name' => $this->getPaymentDescription($params, 127),}}
This probably affects versions back to 4.7.10.