public function __construct() { $apiEndpoint = Client::MODE_SANDBOX; // Use \Eway\Rapid\Client::MODE_PRODUCTION when you go live $this->client = \Eway\Rapid::createClient(EwayController::$_EWAY_API_KEY, EwayController::$_EWAY_API_PASSWORD, $apiEndpoint); $this->tparams = array('ReceipientAccountType' => '', 'Receiver' => '', 'currency' => ''); }
/** * */ public static function createClient($key, $pwd, $endPoint) { if ($endPoint == self::MODE_PRODUCTION) { $mode = \Eway\Rapid\Client::MODE_PRODUCTION; } else { $mode = \Eway\Rapid\Client::MODE_SANDBOX; } return $client = \Eway\Rapid::createClient($key, $pwd, $mode); }