Пример #1
0
        public void Buffer_WithdrawalRequest()
        {
            FFMsg_G2H msg = FreeformEntityFactory.CreateEntity <FFMsg_G2H>(FF_FlowDirection.G2H,
                                                                           new FFCreateEntityRequest_G2H()
            {
                MessageType   = FF_AppId_G2H_MessageTypes.FreeForm,
                Command       = FF_AppId_G2H_Commands.ResponseRequest,
                SessionID     = FF_AppId_SessionIds.ECash,
                TransactionID = 1,
            });
            FFTgt_B2B_EFT tgt = new FFTgt_B2B_EFT();

            msg.AddTarget(tgt);
            FFTgt_G2H_EFT_WithdrawalRequest tgt2 = new FFTgt_G2H_EFT_WithdrawalRequest();

            tgt.AddTarget(tgt2);
            tgt2.AccountType      = FF_AppId_EFT_AccountTypes.PlayerCash;
            tgt2.AmountRequested  = 2520;
            tgt2.PlayerCardNumber = "1000500026";
            tgt2.Pin = "0652";
            byte[] buffer  = FreeformEntityFactory.CreateBuffer(FF_FlowDirection.G2H, msg);
            string sBuffer = buffer.GetConvertBytesToHexString(string.Empty);

            Assert.IsNotNull(buffer);
        }
Пример #2
0
        protected override IMonitorEntity_MsgTgt CreateMonitorTarget(IMonitorEntity parent, IFreeformEntity_MsgTgt request)
        {
            FFTgt_G2H_EFT_WithdrawalRequest ffTgt = request as FFTgt_G2H_EFT_WithdrawalRequest;

            if (ffTgt != null)
            {
                MonTgt_G2H_EFT_WithdrawalRequest monTgt = new MonTgt_G2H_EFT_WithdrawalRequest()
                {
                    AccountType      = ffTgt.AccountType,
                    AmountRequested  = ffTgt.AmountRequested,
                    PlayerCardNumber = ffTgt.PlayerCardNumber,
                    Pin = ffTgt.Pin,
                };
                return(monTgt);
            }
            return(null);
        }