Exemplo n.º 1
0
    protected void CreateSPTokenRequest()
    {
        StringBuilder sbLog  = new StringBuilder();
        SPInfoManager spInfo = new SPInfoManager();

        try
        {
            sbLog.Append("spInfo.GetSPData\r\n");
            Object SPData            = spInfo.GetSPData(this.Context, "SPData");
            string ScoreSystemSecret = spInfo.GetPropertyBySPID(SPID, "SecretKey", SPData);
            sbLog.Append("ScoreSystemSecret");
            String _HeadFooter = "yes";
            String TimeStamp   = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");;

            UserToken UT = new UserToken();
            newSPTokenRequest = UT.GenerateBestAccountMainUserToken(CustID, ReturnUrl, _HeadFooter, TimeStamp, ScoreSystemSecret, out ErrMsg);
            newSPTokenRequest = HttpUtility.UrlEncode(SPID + "$" + newSPTokenRequest);
        }
        catch (Exception ep)
        {
            sbLog.Append(ep.Message);
        }
        finally
        {
            log(sbLog.ToString());
        }
    }
Exemplo n.º 2
0
    protected void CreateSPTokenRequest()
    {
        SPInfoManager spInfo            = new SPInfoManager();
        Object        SPData            = spInfo.GetSPData(this.Context, "SPData");
        string        ScoreSystemSecret = spInfo.GetPropertyBySPID(SPID, "SecretKey", SPData);

        String _HeadFooter = "yes";
        String TimeStamp   = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");;

        UserToken UT = new UserToken();

        newSPTokenRequest = UT.GenerateBestAccountMainUserToken(CustID, ReturnUrl, _HeadFooter, TimeStamp, ScoreSystemSecret, out ErrMsg);
        newSPTokenRequest = HttpUtility.UrlEncode(SPID + "$" + newSPTokenRequest);
    }