Remove instances of fatal
[civicrm-core.git] / CRM / Core / Payment / PaymentExpress.php
index 07322ed5ba53028a64609b9f403312a16b7dd365..47db6a690ca1fa4072ea3889d0619ee9b5139602 100644 (file)
@@ -77,7 +77,7 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
   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');
@@ -121,7 +121,7 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
       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',
@@ -159,7 +159,7 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
 
     }
 
-    $dpsParams = array(
+    $dpsParams = [
       'AmountInput' => str_replace(",", "", number_format($params['amount'], 2)),
       'CurrencyInput' => $params['currencyID'],
       'MerchantReference' => $merchantRef,
@@ -171,7 +171,7 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
       'TxnId' => '',
       'UrlFail' => $url,
       'UrlSuccess' => $url,
-    );
+    ];
     // Allow further manipulation of params via custom hooks
     CRM_Utils_Hook::alterPaymentProcessorParams($this, $params, $dpsParams);