'transaction_id', 'value' => $this->getTransactionId(), 'element' => 'hidden', ), ); } /** * * get payment box post url * * @return string */ public function getPostUrl() { return parent::getIpnUrl(); } /** * * process ipn * * @param \Cube\Controller\Request\AbstractRequest $request * @return bool return true if ipn is valid (for the simulator it will always be true */ public function processIpn(AbstractRequest $request) { if ($request->isPost()) { $this->setTransactionId($_POST['transaction_id']) ->setGatewayPaymentStatus('Completed') ->setGatewayTransactionCode('SimulatorTXN'); return true; } return false; } /** * * for the payment simulator, this will always be true * * @param float $amount * @param string $currency * @return bool */ public function checkIpnAmount($amount, $currency) { return true; } }