Exemplo n.º 1
0
        internal static PaymentResult OnPayVostroAccountEliminate(String tellerNO, String orgNO, DateTime delegateDate, PayVostroAcctEliminate inputData, String exFlowNO, out String outmsg)
        {
            outmsg = "";
            PaymentResult resultdetail = null;
            byte[] codemsg = null;
            bool sent = false;
            string dbexception = "";
            MessageData reqdata = null;
            MessageData recdata = null;
            Guid msgid = Guid.Empty;
            try
            {
                msgid = MsgTransferUtility.PayVostroAccountEliminate(tellerNO, orgNO, delegateDate.ToString("yyyyMMdd"), inputData, ref codemsg);
                reqdata = MsgHandlerEntry.CreateMessageData(msgid, PlatformType.Payment, tellerNO, orgNO, (int)MessageBizType.PayVostroAcctEliminate, codemsg);
#if MQSYNC
                recdata = MQMsgHandlerEntry.DeliverMessage(reqdata, codemsg, out sent);
#else
                recdata = MsgHandlerEntry.DeliverMessage(MsgHandlerEntry.CreateMessageData(msgid, PlatformType.Payment, codemsg));
#endif
                PayVostroAcctEliminateData retdata = MsgTransfer.DecodeMsg(recdata.MessageID, recdata.CurrentRespPackage.PackageMessage) as PayVostroAcctEliminateData;
                MsgLogState statecode = MsgLogState.RecvFailed;
                if (retdata != null && retdata.RPData != null)
                {
                    resultdetail = new PaymentResult();
                    resultdetail.Succeed = (retdata.RPData.RetCode == "00");
                    resultdetail.HostReturnMessage = CommonDataHelper.StrTrimer(retdata.RPData.HostReturnMessage, null);
                    resultdetail.HostReturnCode = CommonDataHelper.StrTrimer(retdata.RPData.HostReturnCode, null);
                    resultdetail.HostTranFlowNo = CommonDataHelper.StrTrimer(retdata.RPData.HostTranFlowNo, null);
                    resultdetail.TransSeq = CommonDataHelper.StrTrimer(retdata.RPData.TransSeq, null);
                    resultdetail.PendingSN = CommonDataHelper.StrTrimer(retdata.RPData.PendingSN, null);
                    outmsg = CommonDataHelper.StrTrimer(retdata.RPData.HostReturnMessage, null);
                    
                    if (retdata.RPData.RetCode == "00")
                    {
                        statecode = MsgLogState.RecvSucceed;
                    }
                    else if (retdata.RPData.RetCode == "02")
                    {
                        statecode = MsgLogState.PayTimeOut;
                    }
                }
                else
                {
                    outmsg = MsgHandlerEntry.Type_Convert_Error;
                }
                //转换保存此次来账销账的资金流水号
                if (!string.IsNullOrEmpty(exFlowNO))
                {
                    recdata.BizMsgID = exFlowNO;
                    //MQMsgCommonHelper.UpdateMQLog(recdata,  resultdetail.HostTranFlowNo, outmsg, statecode, out dbexception);
                    OnUpdateDBLog(recdata, resultdetail.HostTranFlowNo, outmsg, statecode, out dbexception);
                }
                return resultdetail;
            }
            catch (Exception ex)
            {
                outmsg = ex.Message;
                OnException(sent, reqdata, recdata, msgid, ex, outmsg);
                return resultdetail;
            }
        }
Exemplo n.º 2
0
        private void buttonElAccount_Click(object sender, EventArgs e)
        {
            String ouno = textBoxOrgNO.Text.TrimStart();
            String tellno = textBoxTellerNO.Text.TrimStart();
            PayVostroAcctEliminate data = new PayVostroAcctEliminate();
            data.PayBank = textBoxOrgNO.Text.Trim();
            data.Operator = textBoxTellerNO.Text.Trim();
            data.PackageChannelType = textBoxElChannelType.Text.Trim();
            //data.BizType = textBoxElBizType.Text.Trim();
            data.TransSeq = textBoxElTransSeq.Text.Trim();
            data.AccountBanks = textBoxElAccountBanks.Text.Trim();
            data.DelegateDate = textBoxOrigDate.Text.Trim();//DateTime.Now.ToString("yyyyMMdd");
            //data.FundDest = textBoxElFundDest.Text.Trim();
            data.Amount = textBoxElAmount.Text.Trim();
            data.PostAcount = textBoxElPostAccount.Text.Trim();
            data.PostAccountName = textBoxElPostAccountName.Text.Trim();
            data.PostBank = textBoxElPostBank.Text.Trim();
            data.PostBankName = textBoxElPostBankName.Text.Trim();

            Guid messageID = MsgTransferUtility.PayVostroAccountEliminate(tellno, ouno, data.DelegateDate, data, ref uLongText);
            MessageData msgdata = new MessageData { MessageID = messageID, FirstTime = DateTime.Now, TragetPlatform = PlatformType.Payment };
            msgdata.ReqPackageList.Enqueue(new PackageData(1, uLongText));
            msgdata.IsMultiPackage = false;
            DispatchMsg(msgdata);

        }
Exemplo n.º 3
0
        /// <summary>
        /// 来账的销账
        /// </summary>
        /// <param name="tellerNO">柜员号</param>
        /// <param name="orgNO">机构号</param>
        /// <param name="delegateDate">委托日期</param>
        /// <param name="inputData">来账销账的输入数据对象</param>
        /// <param name="codemsg"></param>
        /// <returns></returns>
        public static Guid PayVostroAccountEliminate(String tellerNO, String orgNO, string delegatedate, PayVostroAcctEliminate inputData, ref byte[] codemsg)
        {
            PayVostroAcctEliminateData data = new PayVostroAcctEliminateData();
            data.RQData.PayBank = orgNO;
            data.RQData.Operator = tellerNO;
            data.RQData.PackageChannelType = inputData.PackageChannelType;
            data.RQData.BizType = inputData.BizType;
            data.RQData.TransSeq = inputData.TransSeq;
            data.RQData.AccountBanks = inputData.AccountBanks;
            data.RQData.DelegateDate = delegatedate;//delegateDate.ToString("yyyyMMdd");
            data.RQData.FundDest = inputData.FundDest;
            data.RQData.Amount = inputData.Amount;
            data.RQData.PostAcount = inputData.PostAcount;
            data.RQData.PostAccountName = inputData.PostAccountName;
            data.RQData.PostBank = inputData.PostBank;
            data.RQData.PostBankName = inputData.PostBankName;

            return MsgTransfer.CodeMsgToBinary(data, ref codemsg);
        }
 /// <summary>
 /// 来账的销账
 /// </summary>
 /// <param name="tellerNO">机构号</param>
 /// <param name="orgNO">柜员号</param>
 /// <param name="delegateDate">委托日期</param>
 /// <param name="inputData">销账输入数据</param>
 /// <param name="result">返回结果的数据</param>
 /// <param name="outmsg">失败时的信息</param>
 /// <returns>成功与否</returns>
 public static bool PayVostroAccountEliminate(String tellerNO, String orgNO, DateTime delegateDate, PayVostroAcctEliminate inputData, String exFlowNO, out PaymentResult result, out String outmsg)
 {
     result = ClientSyncHelper.OnPayVostroAccountEliminate(tellerNO, orgNO, delegateDate, inputData, exFlowNO, out outmsg);
     if (result != null && result.Succeed)
     {
         return true;
     }
     outmsg = string.Format("{0}{1}", MsgHandlerEntry.Info_Return_Pay, outmsg);
     return false;
 }
Exemplo n.º 5
0
 /// <summary>
 /// 来账的销账
 /// </summary>
 /// <param name="tellerNO">柜员号</param>
 /// <param name="orgNO">机构号</param>
 /// <param name="delegateDate">委托日期</param>
 /// <param name="inputData">来账销账的输入数据对象</param>
 /// <param name="codemsg"></param>
 /// <returns></returns>
 public static Guid PayVostroAccountEliminate(String tellerNO, String orgNO, string delegatedate, PayVostroAcctEliminate inputData, ref byte[] codemsg)
 {
     PayVostroAcctEliminateData data = new PayVostroAcctEliminateData();
     data.RQData.PayBank = orgNO;
     data.RQData.Operator = tellerNO;
     data.RQData.PackageChannelType = inputData.PackageChannelType;
     data.RQData.BizType = inputData.BizType;
     data.RQData.TransSeq = inputData.TransSeq;
     data.RQData.AccountBanks = inputData.AccountBanks;
     data.RQData.DelegateDate = delegatedate;//delegateDate.ToString("yyyyMMdd");
     data.RQData.FundDest = inputData.FundDest;
     data.RQData.Amount = inputData.Amount;
     data.RQData.PostAcount = inputData.PostAcount;
     data.RQData.PostAccountName = inputData.PostAccountName;
     data.RQData.PostBank = inputData.PostBank;
     data.RQData.PostBankName = inputData.PostBankName;
     
     try
     {
         return PreProcessPaymentMsg(data, ref codemsg);
     }
     catch (BizArgumentsException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw new Exception(MESSAGE_ENCODE_EXCEPTION, ex);
     }
 }