public Ticket AddTicket(Coupon coupon, string type, string redeemerGuid, long duration, string payload) { BrokerDB brokerDB = new BrokerDB(); Ticket ticket = null; if (brokerDB.AuthenticateAgentHeader(agentAuthHeader)) { ticket = brokerDB.AddTicket(coupon, type, redeemerGuid, agentAuthHeader.agentGuid, duration, payload); } return ticket; }