diff --git a/CRM/Core/Payment/eWAY.php b/CRM/Core/Payment/eWAY.php index 12bbb7bc0123..37447e6d5751 100644 --- a/CRM/Core/Payment/eWAY.php +++ b/CRM/Core/Payment/eWAY.php @@ -114,9 +114,6 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment { * ******************************************************* */ public function __construct($mode, &$paymentProcessor) { - // require Standard eWAY API libraries - require_once 'eWAY/eWAY_GatewayRequest.php'; - require_once 'eWAY/eWAY_GatewayResponse.php'; // live or test $this->_mode = $mode; @@ -149,12 +146,14 @@ public function doDirectPayment(&$params) { //------------------------------------ // create eWAY gateway objects //------------------------------------ + require_once 'eWAY/eWAY_GatewayRequest.php'; $eWAYRequest = new GatewayRequest(); if (($eWAYRequest == NULL) || (!($eWAYRequest instanceof GatewayRequest))) { return self::errorExit(9001, "Error: Unable to create eWAY Request object."); } + require_once 'eWAY/eWAY_GatewayResponse.php'; $eWAYResponse = new GatewayResponse(); if (($eWAYResponse == NULL) || (!($eWAYResponse instanceof GatewayResponse))) {