|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/9/2003 Posts: 4 Location: ,
|
Can you help with a posting error?
I have MSXML2.XMLHTTP.4.0 installed, IIS 5.0, Windows 2000. Redhat Firewall.
I have loaded up the test script notify.asp from http://www.eliteweaver.co.uk, (great tester by the way.)
I cannot get the script to reply post,
I get the following:
IPN Sent: PDT
HTTP Status: HTTP/1.0 200 OK
IPN Received: Your script did not reply!
Code is loaded below, but I am sure you have seen it before, I am wondering whether I have the right xml parser installed?
I have been round the Internet and back again trying to resolve this, so any help you can give would greatly be appreciated.
Many thanks in advance
Peter
Code Starts:
<%@Language=VBScript%><%
'// 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.eliteweaver.co.uk/testing/ipntest.php"
SdHost = "www.eliteweaver.co.uk"
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
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
'Set objHTTP = Server.CreateObject("MSXML2.XMLHTTP")
'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)
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
ELSE
'// Standard - Instant Payment Notifiction Variables (Localization)
Receiver_Email = Request.Form("receiver_email")
Business = Request.Form("business")
Item_Name = Request.Form("item_name")
Item_Number = Request.Form("item_number")
Quantity = Request.Form("quantity")
Invoice = Request.Form("invoice")
Custom = Request.Form("custom")
Option_Name1 = Request.Form("option_name1")
Option_Selection1 = Request.Form("option_selection1")
Option_Name2 = Request.Form("option_name2")
Option_Selection2 = Request.Form("option_selection2")
Num_Cart_Items = Request.Form("num_cart_items")
Payment_Status = Request.Form("payment_status")
Pending_Reason = Request.Form("pending_reason")
Payment_Date = Request.Form("payment_date")
Settle_Amount = Request.Form("settle_amount")
Settle_Currency = Request.Form("settle_currency")
Exchange_Rate = Request.Form("exchange_rate")
Payment_Gross = Request.Form("payment_gross")
Payment_Fee = Request.Form("payment_fee")
Mc_Gross = Request.Form("mc_gross")
Mc_Fee = Request.Form("mc_fee")
Mc_Currency = Request.Form("mc_currency")
Tax = Request.Form("tax")
Txn_Id = Request.Form("txn_id")
Txn_Type = Request.Form("txn_type")
For_Auction = Request.Form("for_auction")
Memo = Request.Form("memo")
First_Name = Request.Form("first_name")
Last_Name = Request.Form("last_name")
Address_Street = Request.Form("address_street")
Address_City = Request.Form("address_city")
Address_State = Request.Form("address_state")
Address_Zip = Request.Form("address_zip")
Address_Country = Request.Form("address_country")
Address_Status = Request.Form("address_status")
Payer_Email = Request.Form("payer_email")
Payer_Id = Request.Form("payer_id")
Payer_Status = Request.Form("payer_status")
Payment_Type = Request.Form("payment_type")
Notify_Version = Request.Form("notify_version")
Verify_Sign = Request.Form("verify_sign")
'// Subscription - Instant Payment Notifiction Variables (Localization)
'// You must Remove: ' if you are Using the Subscription Variables
'Subscr_Date = Request.Form("subscr_date")
'Subscr_Effective = Request.Form("subscr_effective")
'Period1 = Request.Form("period1")
'Period2 = Request.Form("period2")
'Period3 = Request.Form("period3")
'Amount1 = Request.Form("amount1")
'Amount2 = Request.Form("amount2")
'Amount3 = Request.Form("amount3")
'Mc_Amount1 = Request.Form("mc_amount1")
'Mc_Amount2 = Request.Form("mc_amount2")
'Mc_Amount3 = Request.Form("mc_amount3")
'Recurring = Request.Form("recurring")
'Reattempt = Request.Form("reattempt")
'Retry_At = Request.Form("retry_at")
'Recur_Times = Request.Form("recur_times")
'Username = Request.Form("username")
'Password = Request.Form("password")
'Subscr_Id = Request.Form("subscr_id")
IF (Result = "VERIFIED") THEN
'// IPN was Confirmed as both Genuine and VERIFIED
'// Check that the "payment_status" variable is: Completed
'// If it is Pending you may Want to Inform your Customer?
'// Check your DB to Ensure this "txn_id" is Not a Duplicate
'// You may want to Check the "payment_gross" or "mc_gross" matches listed Prices?
'// You definately want to Check the "receiver_email" is yours
'// Update your DB and Process this Payment accordingly
'Response.Write ("Result: " &(Result)) // Remove: ' for Testing
ELSEIF (Result = "INVALID") THEN
'// Check your code for any Post back Validation problems
'// Investigate the Fact that this Could be a spoofed IPN
'// If updating your DB, Ensure this "txn_id" is Not a Duplicate
'Response.Write ("Result: " &(Result)) // Remove: ' for Testing
ELSE
'// Something is Definately not Right
END IF
END IF
Set objHTTP = Nothing
%>
|
|
|
|
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/16/2002 Posts: 2,960 Location: ,
|
Would the firewall be an issue? Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/9/2003 Posts: 4 Location: ,
|
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by paypal_pb [br]Would the firewall be an issue? <hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
Hi Patrick, thanks for your response.
I am going to move the web server outside the firewall for a test. Have you heard much about redhat / paypal problems?
Thanks
Peter
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/9/2003 Posts: 4 Location: ,
|
Have moved the web server outside the firewall, still not joy.
Elite always responds. "Your script did not reply"
???
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/16/2002 Posts: 2,960 Location: ,
|
Can you determine if your script is erroring? Try: http://www.paypaldev.org/topic.asp?TOPIC_ID=1658
Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/9/2003 Posts: 4 Location: ,
|
Hi Patrick,
I don't know what i've done, but I transferred it outside the firewall and it started to work on Paypal only. Not the test site I previously mentioned.
I put the webserver back inside the firewall and it still works, but with paypal only.
Satisfied but confused, I shall continue to test it over the coming week whilst we continue to build it into our web site.
Thanks for the referal topic, I shall look at this to see if we can better what we have.
Thanks again for the reply.
Peter
|
|
|
|
Guest
|
YAFVision Theme by Jaben Cargman (Tiny Gecko)Powered by YAF |
YAF © 2003-2009, Yet Another Forum.NETThis page was generated in 0.159 seconds.