Skip to content
Snippets Groups Projects
Commit 0d3a57f8 authored by Jamie McClelland's avatar Jamie McClelland Committed by mattwire
Browse files

avoid "Statement descriptors require at least one alphanumeric character"

Both the statement descriptor and the statement descriptor prefix must
have at least one alpha numeric character.

#293
parent ab6b0d97
No related branches found
No related tags found
1 merge request!156avoid "Statement descriptors require at least one alphanumeric character"
......@@ -947,7 +947,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
# See https://stripe.com/docs/statement-descriptors
$disallowed_characters = ['<', '>', '\\', "'", '"', '*'];
$contactContributionID = $params['contactID'] . '-' . ($params['contributionID'] ?? 'XX');
$contactContributionID = $params['contactID'] . 'X' . ($params['contributionID'] ?? 'XX');
switch ($type) {
// For statement_descriptor / statement_descriptor_suffix:
// 1. Get it from the setting if defined.
......@@ -969,7 +969,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
}
$description = str_replace($disallowed_characters, '', $description);
if (empty($description)) {
$description = '.';
$description = 'X';
}
return substr($description, 0, 22);
......@@ -987,7 +987,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
}
$description = str_replace($disallowed_characters, '', $description);
if (empty($description)) {
$description = '.';
$description = 'X';
}
return substr($description,0,12);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment