Skip to content

Commit

Permalink
Converted deprecated ::fatal error method to throwing an exception, i…
Browse files Browse the repository at this point in the history
  • Loading branch information
adixon committed Mar 18, 2021
1 parent c2db0cc commit 73bd7ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Iats/iATSServiceRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function __construct($options) {
break;
}
if (!$valid) {
CRM_Core_Error::fatal('Invalid currency selection: ' . $options['currencyID'] . ' for domain ' . $iats_domain);
throw new PaymentProcessorException(ts('Invalid currency selection: %1 for domain %2', [1 => $options['currencyID'], 2=> $iats_domain]));
}
}
}
Expand All @@ -122,7 +122,7 @@ public function request($credentials, $request_params) {
// Attempt the SOAP request and log the exception on failure.
$method = $this->method['method'];
if (empty($method)) {
CRM_Core_Error::fatal('No method for request.');
throw new PaymentProcessorException(ts('No method for request.'));
return FALSE;
}
// Do some massaging of parameters for badly behaving iATS methods ($method is now the iATS method, not our internal key)
Expand Down

0 comments on commit 73bd7ec

Please sign in to comment.