Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        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);
        }