c# - C# 中的 Paypal IPN 监听器问题

标签 c# asp.net-mvc paypal paypal-ipn

我正在使用 paypal 和沙箱环境的立即订阅按钮进行测试,并使用 ASP.net MVC3 作为开发环境。 付款完成后,我检查了 IPN 历史记录,响应显示为 200,网址为 如我所料。

我在 Home Controller 中创建了监听器,如下所示。

[HttpPost] 
 public ActionResult paypalCallback()
    {

     //Doing some hardcoded DB insertions.
     DodbInsertion("Received");
     //Writing log file
     WriteLog("Ipn Log");
     Dictionary<string, string> result = new Dictionary<string, string>();
     result.Add("Status", "Success");
     return Json(result, JsonRequestBehavior.AllowGet);

数据库中没有任何内容在写,博客中也没有任何内容发生。 然后我使监听器函数成为 GET 方法并从浏览器调用,然后记录和数据库插入正在发生。即数据库插入和日志功能将正常工作。但是当它从 Paypal IPN Listener 调用时它不起作用。

然后我添加了 Response.StatusCode = 500;到监听器功能。然后在 ipn 历史中它显示状态为 500; 我的应用程序发布在 godady 上。我不知道是否与许可或那里有任何关系。 请帮助我提前致谢。 赛亚姆S

最佳答案

我觉得问题可能出在您的托管环境上 请检查以下内容 http://helpnshareidea.blogspot.in/2013/11/mvc3-applications-in-windows-shared.html

关于c# - C# 中的 Paypal IPN 监听器问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19533042/

相关文章:

asp.net-mvc - 在 ASP.NET MVC 4 中强制同步执行异步操作

php - 在 C++ 中使用 PayPal 自适应支付 API 的最佳方式是什么?

c# - configuration.GetConnectionString ("MyConn") 得到空值?

c# - 如何在 asp.net mvc 5 的 editorforfield 中只允许输入正数

c# - 如何获取ParameterInfo值?

javascript - 从错误处理程序内部获取对 Kendo Grid 的引用

php - Paypal API 更新订单运输公司、订单状态和跟踪号码

android - Appcelerator 5.1.2 GA ( iOS, Android ) 的 Paypal 模块

c# - ASP.Net 如何使用 javascript 迭代网格中的所有行

c# - 如何让代码契约忽略特定的程序集引用?