コード例 #1
0
ファイル: AliOHHelper.cs プロジェクト: xslonglianxia/XKD
        public static void verifyRequestFromAliPay(HttpContext context, string ToUserId, string AppId)
        {
            System.Collections.Generic.Dictionary <string, string> alipayRequstParams = AliOHHelper.getAlipayRequstParams(context);
            string text = alipayRequstParams["biz_content"];

            if (!AliOHHelper.verifySignAlipayRequest(alipayRequstParams))
            {
                AliOHHelper.ReturnXmlResponse(false, RsaKeyHelper.GetRSAKeyContent(AlipayFuwuConfig.merchant_public_key, true), context, ToUserId, AppId);
            }
            else
            {
                AliOHHelper.ReturnXmlResponse(true, RsaKeyHelper.GetRSAKeyContent(AlipayFuwuConfig.merchant_public_key, true), context, ToUserId, AppId);
            }
        }
コード例 #2
0
ファイル: AliOHHelper.cs プロジェクト: xslonglianxia/XKD
        public static void verifygw(HttpContext context)
        {
            System.Collections.Generic.Dictionary <string, string> alipayRequstParams = AliOHHelper.getAlipayRequstParams(context);
            string xml = alipayRequstParams["biz_content"];

            if (!AliOHHelper.verifySignAlipayRequest(alipayRequstParams))
            {
                AliOHHelper.verifygwResponse(false, RsaKeyHelper.GetRSAKeyContent(AlipayFuwuConfig.merchant_public_key, true), context);
            }
            if ("verifygw".Equals(AliOHHelper.getXmlNode(xml, "EventType")))
            {
                AliOHHelper.verifygwResponse(true, RsaKeyHelper.GetRSAKeyContent(AlipayFuwuConfig.merchant_public_key, true), context);
            }
        }
コード例 #3
0
ファイル: AliOHHelper.cs プロジェクト: xslonglianxia/XKD
        public static System.Collections.Generic.List <string> GetAllfollowList()
        {
            System.Collections.Generic.List <string> list = new System.Collections.Generic.List <string>();
            int    num        = 10000;
            string nextUserId = "";

            while (num == 10000)
            {
                AlipayMobilePublicFollowListResponse alipayMobilePublicFollowListResponse = AliOHHelper.GetfollowList(nextUserId);
                if (alipayMobilePublicFollowListResponse != null && !alipayMobilePublicFollowListResponse.IsError && alipayMobilePublicFollowListResponse.Data != null && int.TryParse(alipayMobilePublicFollowListResponse.Count, out num))
                {
                    if (alipayMobilePublicFollowListResponse.Data.UserIdList != null)
                    {
                        nextUserId = alipayMobilePublicFollowListResponse.Data.UserIdList[0];
                        foreach (string current in alipayMobilePublicFollowListResponse.Data.UserIdList)
                        {
                            list.Add(current);
                        }
                    }
                }
                else
                {
                    num = 0;
                }
            }
            return(list);
        }