Paypal IPN Listener Issue in C#

走远了吗. 提交于 2020-01-14 04:33:30

问题


I am using subscribe now button of paypal and sandbox environment for testing and using ASP.net MVC3 as development environment. After payment is done I checked in IPN history there response is showing as 200 and url is what i expected.

I created listener in Home controller as follows.

[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);

}

In database nothing is writing and nothing happens in blog. Then I make listener function a GET method and called from browser then log and DB insertion is happening .Ie db insertion and log function will work correctly. But which was not working when it is called from Paypal IPN Listener.

Then I added Response.StatusCode = 500; to listener function .Then in ipn history it is showing status as 500; My application is published in godady. I don't know is there any relation with permission or something there. Please help me Thanks in advance. Syam.S


回答1:


I feel issue may be with your hosting environment Please check following http://helpnshareidea.blogspot.in/2013/11/mvc3-applications-in-windows-shared.html



来源:https://stackoverflow.com/questions/19533042/paypal-ipn-listener-issue-in-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!