public static void Logon(ReqLogon0800 requestModel, RespLogon0810 responseModel) { try { bool isLoginOk = true; //Not so simple, must do some checking process here if (isLoginOk) { responseModel.ResponseCode = ResponseCode.COMPLETED_SUCCESSFULLY; } else { responseModel.ResponseCode = ResponseCode.TERMINAL_NOT_PERMITTED; } //Must be replaced by true query byte[] pin = new byte[] { 0x2e, 0xde, 0xa3, 0xb4, 0x09, 0x07, 0x64, 0x54 }; byte[] macAddress = new byte[] { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }; byte[] merchant = MessageUtility.StringToAsciiArray("MerchantNameInSubang"); responseModel.PrivateUse = pin.Concat(macAddress).Concat(merchant).ToArray(); } catch { responseModel.ResponseCode = ResponseCode.SYSTEM_ERROR; } }
public Response0810 Execute(Request0800 request) { if (request == null) { if (ProcessErrorNotification != null) { ProcessErrorNotification(); } return(null); } Response0810 response = new Response0810(); if (request.ProcessingCode.TransactionType == TransactionTypeCodeBytes.LOGON) { if (ProcessLogon != null) { response = new RespLogon0810(); ProcessLogon(new ReqLogon0800(request), (RespLogon0810)response); } } //ProcessLogon = null; return(response); }