Jump to content


Photo

change XML code or remove?


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

#1 mtm81

mtm81

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 06 February 2003 - 07:24 PM

Hi, MY standard Paypal Generated IPN code is falling over when trying to create the XML Parser thingy..

I've checked my server with my hosting provider and an XML sniffer and find that MSXML2 v2.6 is the problem... however the snifer also says that MSXML2 v3.0 and MSXML2 v4.0 are installed.

How do i alter my code to accept these instead??

If none of these are possible - how do I go about removing the need for the XML parser...

My current code is:
' post back to PayPal system to validate
str = str & "&cmd=_notify-validate"
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false
objHttp.Send str


Anyone help?

Regards,


Regards,

James

#2 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 06 February 2003 - 09:37 PM

Check out http://www.paypaldev...asp?TOPIC_ID=71

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

#3 mtm81

mtm81

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 07 February 2003 - 03:58 AM

Right, I've tried altering my code to reflect the differing version of XML available however none of them work... I get the "cannot create object" error for everything...

Therefore I think it ould be easiest if I simply removed this bloody XML thing just to get it working...

As I am using the script available on the paypal site, which parts do I remove...

I've tried simply removing the 'chunk' of code relating to the XML parser but the ojbHTTP thingy is referenced further down my code
and therefore creates another error..

What do I remove???

Regards,


Regards,

James

#4 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 07 February 2003 - 12:09 PM

Comment out or delete:

' post back to PayPal system to validate
str = str & "&cmd=_notify-validate"
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false
objHttp.Send str

Change:

' Check notification validation
if (objHttp.status <> 200 ) then
' HTTP error handling
elseif (objHttp.responseText = "VERIFIED") then
' check that Payment_status=Completed
' check that Txn_id has not been previously processed
' check that Receiver_email is an email address in your PayPal account
' process payment
elseif (objHttp.responseText = "INVALID") then
' log for manual investigation
else
' error
end if
set objHttp = nothing
%>

to:

' check that Payment_status=Completed
' check that Txn_id has not been previously processed
' check that Receiver_email is an email address in your PayPal account
' process payment
%>

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

#5 mtm81

mtm81

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 07 February 2003 - 03:17 PM

Thank you very much - it is greatly appriciated.

Regards,

James

Regards,

James




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users