Skip to content

Commit

Permalink
Merge pull request #458 from demeritcowboy/unused
Browse files Browse the repository at this point in the history
[php8] Undeclared but unnecessary vars
  • Loading branch information
adixon authored Jun 12, 2024
2 parents d806e56 + 05b454c commit 5dcc871
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions CRM/Iats/iATSServiceRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class CRM_Iats_iATSServiceRequest {
const iATS_TXN_TRACE = TRUE;
const iATS_TXN_SUCCESS = 'Success';
const iATS_TXN_OK = 'OK';
const iATS_URL_NAMESPACE = 'https://www.iatspayments.com/NetGate/';
const iATS_URL_PROCESSLINK = '/NetGate/ProcessLinkv2.asmx?WSDL';
const iATS_URL_REPORTLINK = '/NetGate/ReportLinkv2.asmx?WSDL';
const iATS_URL_CUSTOMERLINK = '/NetGate/CustomerLinkv2.asmx?WSDL';
Expand Down Expand Up @@ -98,10 +99,6 @@ public function __construct($options) {
}
// TODO: check that the method is allowed!
$this->method = $this->methodInfo($this->type, $method);
// Initialize the request array.
$this->request = array();
// Name space url.
$this->_wsdl_url_ns = 'https://www.iatspayments.com/NetGate/';
$this->options = $options;
$this->options['debug'] = _iats_civicrm_domain_info('debug_enabled');
// Check for valid currencies with domain/method combinations.
Expand Down Expand Up @@ -214,8 +211,8 @@ public function request($credentials, $request_params) {
/* until iATS fixes it's box verify, we need to have trace on to make the hack below work */
$soapClient = new SoapClient($this->_wsdl_url, array('trace' => 1, 'soap_version' => SOAP_1_2));
/* build the request manually as per the iATS docs */
$xml = '<' . $message . ' xmlns="' . $this->_wsdl_url_ns . '">';
$request = array_merge($this->request, $credentials, $request_params);
$xml = '<' . $message . ' xmlns="' . self::iATS_URL_NAMESPACE . '">';
$request = array_merge($credentials, $request_params);
// Pass CiviCRM tag + version to iATS.
$request['comment'] = 'CiviCRM: ' . CRM_Utils_System::version() . ' + ' . 'iATS Extension: ' . $this->iats_extension_version();
$tags = (!empty($this->_tag_order)) ? $this->_tag_order : array_keys($request);
Expand Down

0 comments on commit 5dcc871

Please sign in to comment.