public function response() { $pres = new \CardPayHmacPaymentHttpResponse(); if ($pres->Validate() && $pres->VerifySignature(TB_CARDPAY_SHAREDSECRET)) { $result = $pres->GetPaymentResponse(); return $result; } else { return FALSE; } }
public function __construct($fields = null) { parent::__construct($fields); $this->readOnlyFields = array('SS', 'VS', 'AC', 'RES', 'HMAC', 'AMT', 'CURR', 'TRES', 'RC', 'CID', 'TID', 'TIMESTAMP', 'CC'); if ($fields == null) { $fields = $_GET; } $this->fields['TRES'] = isset($fields['TRES']) ? $fields['TRES'] : null; $this->fields['CID'] = isset($fields['CID']) ? $fields['CID'] : null; }