/** * Get invoice return from gateway feed data. * * This invoice return from gateway, so don't need set method * * @access public * @return string */ public function getGatewayInvoice() { if (parent::isBackendPosted()) { return $_POST['invoice']; } throw new GatewayException('Gateway invoice return from backend posted only.'); }
/** * Set account for merchant. * * @param \Teepluss\Gateway\Drivers\TruePaymentApi */ public function setMerchantAccount($val) { if (is_array($val)) { return parent::setMerchantAccount($val); } // Explode from string. list($appId, $shopId, $password, $privateKey, $rc4key) = explode(':', $val); $this->setAppId($appId); $this->setShopId($shopId); $this->setPassword($password); $this->setPrivateKey($privateKey); $this->setRC4Key($rc4key); return $this; }
/** * State of canceled payment returned. * * override from abstract * * @access public * @return bool */ public function isCancelPosted() { if (parent::isSuccessPosted()) { if (isset($_POST) and array_key_exists('result', $_POST)) { $statusResult = substr($_POST['result'], 0, 2); return strcmp($statusResult, 99) == 0 || $statusResult == ''; } } return false; }
/** * State of canceled payment returned. * * override from abstract * * @access public * @return bool */ public function isCancelPosted() { if (parent::isSuccessPosted()) { if (isset($_POST['HOSTRESP'])) { $statusResult = $_POST['HOSTRESP']; return !in_array($statusResult, $this->_success_group); } } return false; }
/** * Set account for merchant. * * @param object */ public function setMerchantAccount($val) { if (is_array($val)) { return parent::setMerchantAccount($val); } $this->setMerchantId($val); return $this; }