Skip to content

Commit

Permalink
no to translating "and" during sanitization, issue iATSPayments#340
Browse files Browse the repository at this point in the history
  • Loading branch information
adixon committed Nov 30, 2020
1 parent 6bd647b commit 6d41cb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CRM/Core/Payment/iATSService.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ protected function convertParams($params, $method) {
}
// The "&" character is badly handled by the processor,
// so we sanitize it to "and"
$request['firstName'] = str_replace('&', ts('and'), $request['firstName']);
$request['lastName'] = str_replace('&', ts('and'), $request['lastName']);
$request['firstName'] = str_replace('&', 'and', $request['firstName']);
$request['lastName'] = str_replace('&', 'and', $request['lastName']);
$request['creditCardExpiry'] = sprintf('%02d/%02d', $params['month'], ($params['year'] % 100));
$request['total'] = sprintf('%01.2f', CRM_Utils_Rule::cleanMoney($params['amount']));
// Place for ugly hacks.
Expand Down
4 changes: 2 additions & 2 deletions CRM/Core/Payment/iATSServiceACHEFT.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ public function convertParams($params, $method) {
}
// The "&" character is badly handled by the processor,
// so we sanitize it to "and"
$request['firstName'] = str_replace('&', ts('and'), $request['firstName']);
$request['lastName'] = str_replace('&', ts('and'), $request['lastName']);
$request['firstName'] = str_replace('&', 'and', $request['firstName']);
$request['lastName'] = str_replace('&', 'and', $request['lastName']);
$request['total'] = sprintf('%01.2f', CRM_Utils_Rule::cleanMoney($params['amount']));
// Place for ugly hacks.
switch ($method) {
Expand Down

0 comments on commit 6d41cb8

Please sign in to comment.