<?php
/*
+--------------------------------------------------------------------+
- | FirstData Core Payment Module for CiviCRM version 4.7 |
+ | FirstData Core Payment Module for CiviCRM version 5 |
+--------------------------------------------------------------------+
| Licensed to CiviCRM under the Academic Free License version 3.0 |
| |
}
if (!defined('CURLOPT_SSLCERT')) {
- CRM_Core_Error::fatal(ts('%1 - Gateway requires curl with SSL support', array(1 => $paymentProcessor)));
+ CRM_Core_Error::fatal(ts('%1 - Gateway requires curl with SSL support', [1 => $paymentProcessor]));
}
/**********************************************************
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $requestxml);
curl_setopt($ch, CURLOPT_SSLCERT, $key);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL') ? 2 : 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'));
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, Civi::settings()->get('verifySSL') ? 2 : 0);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, Civi::settings()->get('verifySSL'));
// return the result on success, FALSE on failure
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 36000);
return $params;
}
}
+
// end function doDirectPayment
/**
* CiviCRM V2.0 Declaration
*/
public function checkConfig() {
- $errorMsg = array();
+ $errorMsg = [];
if (empty($this->_paymentProcessor['user_name'])) {
$errorMsg[] = ts(' Store Name is not set for this payment processor');