首页 新闻 会员 周边 捐助

paypal ipn 支付问题

0
悬赏园豆:5 [已关闭问题] 关闭于 2017-10-19 13:58

1:https://ipnpb.paypal.com/cgi-bin/webscr?cmd=_notify-validate

2:https://ipnpb.sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate

 

1这个url直接再浏览器里运行可以,用HttpWebRequest对象也可以获取.而

2这个url直接再浏览器里运行可以,用HttpWebRequest确显示:基础连接已经关闭: 发送时发生错误

请问什么问题呢?

赋上测试代码,请大神帮忙看看

            var verificationResponse = string.Empty;

            try
            {

                var verificationRequest = (HttpWebRequest)WebRequest.Create("https://ipnpb.sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate");
                //var verificationRequest = (HttpWebRequest)WebRequest.Create("https://ipnpb.paypal.com/cgi-bin/webscr?cmd=_notify-validate");
                verificationRequest.Method = "get";
                verificationRequest.ContentType = "application/x-www-form-urlencoded";
                var streamIn = new StreamReader(verificationRequest.GetResponse().GetResponseStream());
                verificationResponse = streamIn.ReadToEnd();
                streamIn.Close();
                Response.Write(verificationResponse);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
依人的主页 依人 | 初学一级 | 园豆:14
提问于:2017-10-18 17:17
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册