public function verifyAction() { $input = $this->_params; $verify = new system\library\Verify("", "", "", $input); $myobj = \system\library\Database\DB::find_by_sql("SELECT * FROM merchants WHERE number=" . $input['number']); if ($myobj) { $myobj = new \ArrayObject(array_shift($myobj)); if ($verify->get($myobj->offsetGet("hashed"), $input)) { return "valid"; } else { return "invalid"; } } }
public static function getTerminalByName($short_name) { return DB::find_by_sql("SELECT * FROM " . self::$table . " WHERE short_name='" . $short_name . "'"); }