Skip to content

Commit

Permalink
Fix php warning, issue iATSPayments#354
Browse files Browse the repository at this point in the history
  • Loading branch information
adixon committed Mar 18, 2021
1 parent a250198 commit 1b29f15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Core/Payment/iATSService.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ protected function convertParams($params, $method) {
// so we sanitize it to "and"
$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['creditCardExpiry'] = sprintf('%02d/%02d', intval($params['month']), (intval($params['year']) % 100));
$request['total'] = sprintf('%01.2f', CRM_Utils_Rule::cleanMoney($params['amount']));
// Place for ugly hacks.
switch ($method) {
Expand Down Expand Up @@ -496,7 +496,7 @@ public function updateSubscriptionBillingInfo(&$message = '', $params = array())
'state' => $state_province['abbreviation'],
'zipCode' => $params['postal_code'],
'creditCardNum' => $params['credit_card_number'],
'creditCardExpiry' => sprintf('%02d/%02d', $params['month'], $params['year'] % 100),
'creditCardExpiry' => sprintf('%02d/%02d', intval($params['month']), intval($params['year']) % 100),
'mop' => $mop[$params['credit_card_type']],
);

Expand Down

0 comments on commit 1b29f15

Please sign in to comment.