Пример #1
0
        public OperationResult Create(string tokenVendorID, DateTime expirationDate, string supplierSerialNumber, string creationLotID, string pin, out TokenInfoCore tokenInfoCore)
        {
            OperationResult result;

            try
            {
                string  typeName = new TokensValidatorDAO().DeployAssemblyNameByTokenParamsID(tokenVendorID);
                ITokens tokens   = TokensFactory.LoadAssembly(typeName);
                result = tokens.Create(tokenVendorID, expirationDate, supplierSerialNumber, creationLotID, pin, out tokenInfoCore);
            }
            catch (Exception innerException)
            {
                throw new Exception("SF.Expand.SAF.Core.PREProcessorTokens::Create[]", innerException);
            }
            return(result);
        }
Пример #2
0
        public OperationResult Create(string tokenVendorID, DateTime expirationDate, string supplierSerialNumber, string creationLotID, string pin, out TokenInfoCore tokenInfoCore)
        {
            tokenInfoCore = new TokenInfoCore();
            OperationResult result;

            try
            {
                string  assemb  = new TokensValidatorDAO().DeployAssemblyNameByTokenParamsID(tokenVendorID);
                ITokens _tokens = TokensFactory.LoadAssembly(assemb);
                if (_tokens == null)
                {
                    SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.ERROR, "SAFCORE", new string[]
                    {
                        "http://sfexpand.SAFCore.PREProcessorTokens.softfinanca.com/",
                        "[ITokens]::" + assemb.Trim(),
                        "Invalid or null typename!"
                    });
                    tokenInfoCore = new TokenInfoCore();
                    result        = OperationResult.Error;
                }
                else
                {
                    result = _tokens.Create(tokenVendorID, expirationDate, supplierSerialNumber, creationLotID, pin, out tokenInfoCore);
                }
            }
            catch (Exception ex)
            {
                SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.EXCEPTION, "SAFCORE", new string[]
                {
                    "http://sfexpand.SAFCore.PREProcessorTokens.softfinanca.com/",
                    Assembly.GetExecutingAssembly().FullName.ToString(),
                    ex.ToString()
                });
                tokenInfoCore = new TokenInfoCore();
                result        = OperationResult.Error;
            }
            return(result);
        }