/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $pluginVersion = WirecardCEE_QMore_FrontendClient::generatePluginVersion('InitiationTest', '0.0.0', 'defaultInstance', '0.0.0'); $oBackClient = new WirecardCEE_QMore_BackendClient(array('CUSTOMER_ID' => $this->_customerId, 'SHOP_ID' => $this->_shopId, 'SECRET' => $this->_secret, 'LANGUAGE' => $this->_language, 'PASSWORD' => $this->_toolkitPassword)); $this->object = $oBackClient->getOrderDetails($this->_orderNumber)->getOrder()->getPayments()->current(); }
public function getFinancialInstitutions() { /** @var Wirecard_CheckoutSeamless_Helper_Data $helper */ $helper = Mage::helper('wirecard_checkoutseamless'); $cl = new WirecardCEE_QMore_BackendClient($helper->getBackendConfigArray()); $response = $cl->getFinancialInstitutions($this->getMethod()->getPaymentMethodType()); if (!$response->hasFailed()) { $ret = $response->getFinancialInstitutions(); $c = null; if (class_exists('Collator')) { $c = new Collator('root'); } uasort($ret, function ($a, $b) use($c) { if ($c === null) { return strcmp($a['id'], $b['id']); } else { return $c->compare($a['name'], $b['name']); } }); return $ret; } else { $helper->log(__METHOD__ . ':' . print_r($response->getErrors(), true), LOG_WARNING); return array(); } }
/** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); $customerId = $this->_customerId; $shopId = $this->_shopId; $secret = $this->_secret; $language = $this->_language; $oBackClient = new WirecardCEE_QMore_BackendClient(array('CUSTOMER_ID' => $customerId, 'SHOP_ID' => $shopId, 'SECRET' => $secret, 'LANGUAGE' => $language, 'PASSWORD' => $this->_toolkitPassword)); $this->object = $oBackClient->getOrderDetails($this->_orderNumber); }
/** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); $customerId = $this->_customerId; $shopId = $this->_shopId; $secret = $this->_secret; $language = $this->_language; $toolkitPassword = $this->_toolkitPassword; $oBackClient = new WirecardCEE_QMore_BackendClient(array('CUSTOMER_ID' => $customerId, 'SHOP_ID' => $shopId, 'SECRET' => $secret, 'LANGUAGE' => $language, 'PASSWORD' => $toolkitPassword)); $this->object = $oBackClient->recurPayment($this->_sourceOrderNumber, $this->_amount, $this->_currency, $this->_orderDescription, $this->_orderNumber, $this->_depositFlag); }
public function testDepositReversal() { $oResponse = $this->object->depositReversal(123456, 123445); $this->assertInstanceOf('WirecardCEE_QMore_Response_Backend_DepositReversal', $oResponse); $this->assertEquals($oResponse->getStatus(), 0); $this->assertEmpty($oResponse->getErrors()); $this->assertFalse($oResponse->hasFailed()); }
public function __construct($config = null) { parent::__construct($config); $this->_requestData[self::COMMAND] = self::$COMMAND_TRANSFER_FUND; }