public function checkConfig() {
$config = CRM_Core_Config::singleton();
- $error = array();
+ $error = [];
if (empty($this->_paymentProcessor['user_name'])) {
$error[] = ts('UserID is not set in the Administer » System Settings » Payment Processors');
CRM_Core_Error::fatal(ts('Component is invalid'));
}
- $url = $config->userFrameworkResourceURL . "extern/pxIPN.php";
+ $url = CRM_Utils_System::externUrl('extern/pxIPN');
if ($component == 'event') {
$cancelURL = CRM_Utils_System::url('civicrm/event/register',
}
- $dpsParams = array(
+ $dpsParams = [
'AmountInput' => str_replace(",", "", number_format($params['amount'], 2)),
'CurrencyInput' => $params['currencyID'],
'MerchantReference' => $merchantRef,
'TxnId' => '',
'UrlFail' => $url,
'UrlSuccess' => $url,
- );
+ ];
// Allow further manipulation of params via custom hooks
CRM_Utils_Hook::alterPaymentProcessorParams($this, $params, $dpsParams);