Im having trouble with my Paypal IPN handler. It runs through to a certain point and simply doesnt get any further. Any ideas:
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Response = context.Response
Request = context.Request
[Global].writeToDebugFile("PayPalIPN: ProcessRequest Entered")
Try
If IsVerifiedNotification() Then
<process order>
End If
Catch Ex As Exception
[Global].writeToDebugFile(String.Format("PaypalIPN: {0}", Ex.Message & Ex.InnerException.Message & Ex.StackTrace))
End Try
[Global].writeToDebugFile("PayPalIPN: ProcessRequest Exited")
End Sub
Protected Function IsVerifiedNotification() As Boolean
[Global].writeToDebugFile("PayPalIPN: IsVerifiedNotification Entered")
Dim R As String = String.Empty
Dim Post As String = Request.Form.ToString() & "&cmd=_notify-validate"
[Global].writeToDebugFile("*** THIS LINE IS EXECUTED ***")
Dim Req As HttpWebRequest = DirectCast(WebRequest.Create("https://www.paypal.com/cgi-bin/webscr"), HttpWebRequest)
[Global].writeToDebugFile("*** THIS LINE IS NEVER EXECUTED ***")
Req.Method = "POST"
Req.ContentType = "application/x-www-form-urlencoded"
Req.ContentLength = Post.Length
Dim Writer As New StreamWriter(Req.GetRequestStream(), System.Text.Encoding.ASCII)
Writer.Write(Post)
Writer.Close()
Dim Reader As New StreamReader(Req.GetResponse().GetResponseStream())
R = Reader.ReadToEnd()
Reader.Close()
Return R = "VERIFIED"
[Global].writeToDebugFile("PayPalIPN: IsVerifiedNotification Exited")
End Function
Member
13 Points
48 Posts
Paypal IPN handler
Feb 19, 2010 01:18 PM|bbm951|LINK
Hi all,
Im having trouble with my Paypal IPN handler. It runs through to a certain point and simply doesnt get any further. Any ideas:
Member
68 Points
289 Posts
Re: Paypal IPN handler
Mar 09, 2010 08:12 AM|dcwmorley|LINK
I don't know whether the following will help you
http://www.3bbb3.com
Member
13 Points
48 Posts
Re: Paypal IPN handler
Mar 16, 2010 06:08 AM|bbm951|LINK
This was all down to permissions on my server!