public OTPResultSvcResponse OTPResult(OTPResultSvcRequest req) { OTPResultSvcResponse res; using (ComplaintFacade facade = new ComplaintFacade()) { res = facade.OTPResult(req); } return(res); }
public OTPResultSvcResponse OTPResult(OTPResultSvcRequest req) { bool valid = false; string msg = string.Empty; OTPResultSvcResponse res = new OTPResultSvcResponse(); using (var commonFacade = new CommonFacade()) { valid = commonFacade.VerifyServiceRequest <Header>(req.Header); res.Header = new Header { service_name = req.Header.service_name, channel_id = req.Header.channel_id, user_name = req.Header.user_name, password = req.Header.password, transaction_date = req.Header.transaction_date, reference_no = req.Header.reference_no, system_code = req.Header.system_code }; } if (valid) { using (var srFacade = new ServiceRequestFacade()) { if (srFacade.UpdateSendSMSVerify(req, out msg)) { res.STATUS = "0"; res.ERROR_CODE = "0"; res.ERROR_DESC = ""; } else { res.STATUS = "1"; res.ERROR_CODE = "1"; res.ERROR_DESC = msg; } } } else { res.STATUS = "1"; res.ERROR_CODE = "1"; res.ERROR_DESC = "User name or password is invalid."; } return(res); }
public OTPResultSvcResponse OTPRequest(OTPResultSvcRequest req) { return(OTPResult(req)); }