Syam
Syam

Reputation: 51

Paypal IPN Listener Issue in C#

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

Upvotes: 1

Views: 514

Answers (1)

Lab5Connect
Lab5Connect

Reputation: 94

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

Upvotes: 1

Related Questions