Jump to content


Photo

IPN Status = 405


  • This topic is locked This topic is locked
4 replies to this topic

#1 olliec

olliec

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 03 February 2003 - 02:22 PM

When I output my Status and Result coming back from PP with this script I get:

405<html><head><title>Method not allowed</title></head><body><h1>HTTP/1.1
405 Method not allowed</h1></body></html>

Here's a piece of the code.

IPN = Request.Form
IPN = "cmd=_notify-validate&" & IPN

objHTTP.Send IPN

Dim Status, Result

Status = objHttp.Status
Result = objHttp.ResponseText

IF (Status <> 200 ) THEN

Does the 405 mean anything specific?? Which method is it referring to? O can only think that it must be a objHttp method. I have tried referencing various versions of XMLHTTP. My provider says I have XMLHTTP 4.0. Any ideas?? Thanks much
  • xxkalliy likes this

#2 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 03 February 2003 - 02:55 PM

"405 Method not allowed" normally means that the the server is configured to disallow POSTing to the URL in question.

I'm not able to follow the code you provided as it is a very small portion of the sample we provide.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn

#3 olliec

olliec

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 03 February 2003 - 04:15 PM

Awesome! Maybe this is what's going on. I have not checked the permissions since they moved to the new server. I'll check it out. Thanks a ton!

#4 olliec

olliec

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 03 February 2003 - 04:32 PM

Do I want to give annonymous IUSER write privileges to my whole web?? Is that what you are suggesting?? Or are you suggesting I put the script in a folder and give them write access to only that folder? Thanks.

#5 olliec

olliec

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 03 February 2003 - 05:06 PM

Here is a little bit more of the code for this page. The only way I know to debug these sorts of pages is by sending emails at different places trying to locate where the script fails and what the variables are at that point. Is there a better way to debug??

I created a Virtual Directory (IIS) for the folder where my IPN script is located and set permissions to Read, Write, Execute, Script and Allow Anonymous Access "Yes". I'm still getting the 405 error. Does this sound even close to what I needed to do? Thanks.


'// IPN Posting Modes; Choose: 1, 2, 3 or 4

PostMode = "3"

'//* 1 = Live Via PayPal Network Non-Secure
'//* 2 = Live Via PayPal Network SSL-Secure
'//* 3 = Test Via EliteWeaver UK Non-Secure
'//* 4 = Test Via EliteWeaver UK SSL-Secure




Dim objHttp, IPN

IF PostMode = "1" THEN

'// Live Via PayPal Network Non-Secure
WebUrl = "http://www.paypal.com/cgi-bin/webscr"
SdHost = "www.paypal.com"

ELSEIF PostMode = "2" THEN

'// Live Via PayPal Network SSL-Secure
WebUrl = "https://www.paypal.com/cgi-bin/webscr"
SdHost = "www.paypal.com"

ELSEIF PostMode = "3" THEN

'// Test Via EliteWeaver UK Non-Secure
WebUrl = "http://www.optioninsight.com/ipntestbed.html"
SdHost = "www.optioninsight.com"

Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.Open "POST", WebUrl, False
objHTTP.setRequestHeader "Host", SdHost
objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHTTP.setRequestHeader "Content-Length", Len(IPN)

ELSEIF PostMode = "4" THEN

'// Test Via EliteWeaver UK SSL-Secure
WebUrl = "https://ssl.uksecurewebhosting.net/~elitew/testing/ipntest.php"
SdHost = "ssl.uksecurewebhosting.net"

ELSE

'// Selected PostMode was Probably Not Set to 1, 2, 3 or 4
Response.Write ("PostMode: " &(PostMode) & " is invalid!")

END IF


IPN = Request.Form
IPN = "cmd=_notify-validate&" & IPN

objHTTP.Send IPN

Dim Status, Result

Status = objHttp.Status
Result = objHttp.ResponseText

IF (Status <> 200 ) THEN

'// Problem: Maybe the Requested url is Unavailable
'// Maybe Setup a little email Notification here?
'Response.Write ("Status: " &(Status)) // Remove: ' for Testing

'Begin Send a Problem Email to Customer
Dim objCDO4
Set objCDO4 = Server.CreateObject("CDONTS.NewMail")
objCDO4.From = "ollie.costello@aspentech.com"
objCDO4.To = "ollie.costello@aspentech.com"
objCDO4.Subject = "A Problem Was Encountered With Your PayPal Puchase from BigBendMaps.com"
objCDO4.Body = status &result
objCDO4.Send()
Set objCDO4 = Nothing

ELSE






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users