function payment_recieve() { $returnedPayment = new TpReturnedPayment($this->config); //overime prijaty podpis if ($returnedPayment->verifySignature()) { $status = $returnedPayment->getStatus(); switch ($status) { case TpReturnedPayment::STATUS_OK: return "OK"; case TpReturnedPayment::STATUS_CANCELED: return "ERROR"; case TpReturnedPayment::STATUS_ERROR: return "ERROR"; case TpReturnedPayment::STATUS_UNDERPAID: return "UNDERPAID"; case TpReturnedPayment::STATUS_WAITING: return "WAITING"; default: return "ERROR"; } } else { return "ERROR"; } }
/** * @return int */ public function getStatus() { return (int) parent::getStatus(); }