Jump to content


Photo

Post won't work


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

#1 jecrossl

jecrossl

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 20 January 2003 - 07:20 AM

Hi there.. I'm having a problem using IPN with my ASP handler page. Using both paypal for real, and the test site at www.eliteweaver.co.uk, my code never seems to send any data back to the server. The test site fails and reports that my code has not sent anything.

I have tried taking all "extra" sections out of my code (database writes, etc.) and just having the basic sample code which Paypal provides... That doesn't work either. I have been assured that MSXML is installed on the server. Anyone have any ideas what could cause this? I'm an experienced programmer and I'm 99% sure that the code I am using is correct.... I'm stumped...


#2 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 21 January 2003 - 01:08 AM

Make sure IPN is "on" in your Profile.

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

#3 EliteWeaver

EliteWeaver

    Junior Member

  • Members
  • 239 posts

Posted 21 January 2003 - 02:52 AM

If our test site says that your IPN post is not coming back to us then your script is definately not posting back as we post to your handler at 1 second, 2, 4, 8, 16 and 32 before giving up! This is probably why it will not work with PayPal either.

Maybe you need to specify a different version of the XML parser?


Best regards,

Marcus Cicero
EliteWeaver UK


#4 moojjoo

moojjoo

    Member

  • Members
  • PipPip
  • 10 posts

Posted 24 January 2003 - 02:17 PM

I am having the same problem...


Thank you IPN Tester,
Your simulated IPN has been sent successfully


Your status report appears below:


IPN Creation Date: 13:14:07 Jan 24, 2003 PDT
IPN Expiration Date: 22:14:07 Jan 25, 2003 PDT
Send Count: 1
Target IPN Script: http://www.autoinven.../validation.asp


IPN Sent: 13:14:07 Jan 24, 2003 PDT
HTTP Status: HTTP/1.1 200 OK
IPN Received: Your script did not reply!
Post Back: N/A


Variables Sent: 53
Variables Expected: 54
Variables Received: 0


String Length Sent: 1225
String Length Expected: 1246
String Length Received: 0


Desired Response: VERIFIED
Actual Response: None
Intentional Response: No!


Summary: Your script is not posting back to us!




#5 moojjoo

moojjoo

    Member

  • Members
  • PipPip
  • 10 posts

Posted 24 January 2003 - 02:21 PM

<%@LANGUAGE="VBScript"%>
<%
Dim str, OrderID, Txn_id, Payment_status
Dim objHttp

' read post from PayPal system and add 'cmd'
str = Request.Form
OrderID = Request.Form("item_number")
Txn_id = Request.Form("txn_id")
Payment_status = Request.Form("payment_status")

' 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.open "POST", "http://www.eliteweaver.co.uk/testing/ipntest.php", false
objHttp.Send str

' assign posted variables to local variables
' note: additional IPN variables also available -- see IPN documentation
receiver_email = Request.Form("receiver_email")
item_name = Request.Form("item_name")
item_number = Request.Form("item_number")
quantity = Request.Form("quantity")
invoice = Request.Form("invoice")
custom = Request.Form("custom")
payment_status = Request.Form("payment_status")
pending_reason = Request.Form("pending_reason")
payment_date = Request.Form("payment_date")
payment_gross = Request.Form("payment_gross")
payment_fee = Request.Form("payment_fee")
txn_id = Request.Form("txn_id")
txn_type = Request.Form("txn_typ")
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_status = Request.Form("payer_status")
payment_type = Request.Form("payment_type")
notify_version = Request.Form("notify_version")
verify_sign = Request.Form("verify_sign")
subscr_id = Request.Form("subscr_id")
subscr_date = Request.Form("subscr_date")
period3 = Request.Form("period3")
amount3 = Request.Form("amount3")
recurring = Request.Form("recurring")
reattempt = Request.Form("reattempt")
retry_at = Request.Form("retry_at")


' Check notification validation
if (objHttp.status <> 200 ) then
Response.write("objHttp status <> 200 Error")

elseif (objHttp.responseText = "VERIFIED") then
%>
<!-- #include file=includes/connectString.asp -->
<%
' check that Payment_status=Completed
If payment_status = "Completed" then
mySQL = "SELECT txn_id FROM paypal ORDER BY txn_id ASC"
set rsPaypal = CONN_STRING.execute(mySQL)

'************ check that Txn_id has not been previously processed *******************
Do Until rsPaypal.EOF

If rsPaypal("txn_id") = txn_id Then
Response.redirect ("duplicate.asp")

Else
' If Txn_id not processed before insert into database process payment
mySQL = "INSERT INTO paypal(receiver_email, item_name, item_number, quantity, invoice, custom, payment_status, pending_reason, payment_date, payment_gross, payment_fee, txn_id, txn_type, first_name, last_name, address_street, address_city, address_state, address_zip, address_country, address_status, payer_email, payer_status, payment_type, notify_version, verify_sign, subscr_id, subscr_date, period3, amount3, recurring, reattempt, retry_at) VALUES"
mySQL = mySQL & " ('" & receiver_email & "','" & item_name & "','" & item_number & "','" & quantity & "','" & invoice & "','" & custom & "','" & payment_status & "','" & pending_reason & "','" & payment_date & "','" & payment_gross & "','" & payment_fee & "','" & txn_id & "','" & txn_type & "','" & first_name & "','" & last_name & "','" & address_street & "','" & address_city & "','" & address_state & "','" & address_zip & "','" & address_country & "','" & address_status & "','" & payer_email & "','" & payer_status & "','" & payment_type & "','" & notify_version & "','" & verify_sign & "','" & subscr_id & "','" & subscr_date & "','" & period3 & "','" & amount3 & "','" & recurring & "','" & reattempt & "','" & retry_at & "')"

CONN_STRING.Execute(mySQL)
End if
rsPaypal.moveNext
Loop
'************ check that Txn_id has not been previously processed *******************

Elseif payment_status = "Pending" & pending_reason = "echeck" then
Response.write "echeck"
End if


elseif (objHttp.responseText = "INVALID") then

FromName="Auto Inventory Online"
FromAddress="support@autoinventoryonline.com"
Recipient="moojjoo@mmwebs.com"
Subject="Auto Inventory Online Subscription Invalid Information"

htmlText = "First Name" & ": " & Request.Form("first_name") & CHR(10)_
& "Last Name" & ": " & Request.Form("last_name") & CHR(10)_
& "Email Address" & ": " & Request.Form("payer_email") & CHR(10)_
& "City" & ": " & Request.Form("address_city") & CHR(10)_
& "State" & ": " & Request.Form("address_state") & CHR(10)_
& "Zip" & ": " & Request.Form("address_zip") & CHR(10)

Set Mailer = Server.CreateObject("SMTPsvg.Mailer")

Mailer.RemoteHost = "localhost"
Mailer.FromName = FromName
Mailer.FromAddress = FromAddress
Mailer.Recipient = Recipient
Mailer.AddBCC "Robert Dannelly","moojjoo@mmwebs.com"
Mailer.Subject = Subject
Mailer.BodyText = htmlText
Mailer.ContentType = "text/html"
Mailer.CharSet = 2
'Mailer.AddAttachment (Server.Mappath(""))
'returnValue = Mailer.AddExtraHeader("MIME-Version: 1.0")
'returnValue = Mailer.AddExtraHeader("Content-Type: text/html; charset=us-ascii")
if not Mailer.SendMail then
MailSent=1
else
MailSent=0
end if

Set Mailer = Nothing

Response.write("Invalid from HTTP objHttp")

else
Response.write ("Error Final") & "<br><br><br><br>"
Response.write (str)
end if
set objHttp = nothing
%>


#6 moojjoo

moojjoo

    Member

  • Members
  • PipPip
  • 10 posts

Posted 24 January 2003 - 02:26 PM

What is posting from your www.eliteweaver.co.uk. Please help because I am ready to run into a wall

receiver_email=paypal@yourdomain.com
&business=paypal@yourdomain.com
&item_name=Item+Name
&item_number=718
&quantity=1
&invoice=641709
&custom=Custom
&option_name1=Option
&option_selection1=Selection
&option_name2=Option
&option_selection2=Selection
&payment_status=Completed
&payment_date=13%3A07%3A44+Jan+24%2C+2003+PDT
&payment_gross=24.99&payment_fee=1.02
&mc_gross=24.99
&mc_fee=1.02
&mc_currency=USD
&tax=0.00
&txn_id=TPFJDR3OPI7S0C41S
&txn_type=web_accept
&memo=PayPal+Special+Instructions%2FNote+Field.
&first_name=Thomas
&last_name=Tester
&address_street=21+Test+Street
&address_city=Testopia
&address_state=Testvill
e&address_zip=123456
&address_country=United-States
&address_status=confirmed
&payer_email=paypal@theirdomain.com
&payer_id=SDL4JO4RYE6G8
&payer_status=verified
&payment_type=instant┬Čify_version=1.
4&verify_sign=rUAwcUvno31ZxXAX6uof5rl4GGMUc92C6hI8SBvrEPGR-sWAc1zBfQdI
&subscr_date=13%3A07%3A44+Jan+24%2C+2003+PDT
&subscr_effective=13%3A07%3A44+Jan+24%2C+2003+PDT
&period1=7+d
&period2=3+w
&period3=11+m
&amount1=1.99
&amount2=6.49
&amount3=19.99
&mc_amount1=1.99
&mc_amount2=6.49
&mc_amount3=19.99
&recurring=1
&reattempt=1
&retry_at=13%3A07%3A44+Jan+31%2C+2003+PDT
&username=CYiBKNSE
&password=eLdCvpiPYj.HE
&subscr_id=S-OYC03NZZ6SMUKS9MT
&cmd=_notify-validate

#7 moojjoo

moojjoo

    Member

  • Members
  • PipPip
  • 10 posts

Posted 24 January 2003 - 02:30 PM

Note it is crapping out and going to by final error...Please email me at moojjoo@mmwebs.com with any hints to what I am doing wrong.

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by moojjoo
[br]<%@LANGUAGE="VBScript"%>
<%
Dim str, OrderID, Txn_id, Payment_status
Dim objHttp

' read post from PayPal system and add 'cmd'
str = Request.Form
OrderID = Request.Form("item_number")
Txn_id = Request.Form("txn_id")
Payment_status = Request.Form("payment_status")

' 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.open "POST", "http://www.eliteweaver.co.uk/testing/ipntest.php", false
objHttp.Send str

' assign posted variables to local variables
' note: additional IPN variables also available -- see IPN documentation
receiver_email = Request.Form("receiver_email")
item_name = Request.Form("item_name")
item_number = Request.Form("item_number")
quantity = Request.Form("quantity")
invoice = Request.Form("invoice")
custom = Request.Form("custom")
payment_status = Request.Form("payment_status")
pending_reason = Request.Form("pending_reason")
payment_date = Request.Form("payment_date")
payment_gross = Request.Form("payment_gross")
payment_fee = Request.Form("payment_fee")
txn_id = Request.Form("txn_id")
txn_type = Request.Form("txn_typ")
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_status = Request.Form("payer_status")
payment_type = Request.Form("payment_type")
notify_version = Request.Form("notify_version")
verify_sign = Request.Form("verify_sign")
subscr_id = Request.Form("subscr_id")
subscr_date = Request.Form("subscr_date")
period3 = Request.Form("period3")
amount3 = Request.Form("amount3")
recurring = Request.Form("recurring")
reattempt = Request.Form("reattempt")
retry_at = Request.Form("retry_at")


' Check notification validation
if (objHttp.status <> 200 ) then
Response.write("objHttp status <> 200 Error")

elseif (objHttp.responseText = "VERIFIED") then
%>
<!-- #include file=includes/connectString.asp -->
<%
' check that Payment_status=Completed
If payment_status = "Completed" then
mySQL = "SELECT txn_id FROM paypal ORDER BY txn_id ASC"
set rsPaypal = CONN_STRING.execute(mySQL)

'************ check that Txn_id has not been previously processed *******************
Do Until rsPaypal.EOF

If rsPaypal("txn_id") = txn_id Then
Response.redirect ("duplicate.asp")

Else
' If Txn_id not processed before insert into database process payment
mySQL = "INSERT INTO paypal(receiver_email, item_name, item_number, quantity, invoice, custom, payment_status, pending_reason, payment_date, payment_gross, payment_fee, txn_id, txn_type, first_name, last_name, address_street, address_city, address_state, address_zip, address_country, address_status, payer_email, payer_status, payment_type, notify_version, verify_sign, subscr_id, subscr_date, period3, amount3, recurring, reattempt, retry_at) VALUES"
mySQL = mySQL & " ('" & receiver_email & "','" & item_name & "','" & item_number & "','" & quantity & "','" & invoice & "','" & custom & "','" & payment_status & "','" & pending_reason & "','" & payment_date & "','" & payment_gross & "','" & payment_fee & "','" & txn_id & "','" & txn_type & "','" & first_name & "','" & last_name & "','" & address_street & "','" & address_city & "','" & address_state & "','" & address_zip & "','" & address_country & "','" & address_status & "','" & payer_email & "','" & payer_status & "','" & payment_type & "','" & notify_version & "','" & verify_sign & "','" & subscr_id & "','" & subscr_date & "','" & period3 & "','" & amount3 & "','" & recurring & "','" & reattempt & "','" & retry_at & "')"

CONN_STRING.Execute(mySQL)
End if
rsPaypal.moveNext
Loop
'************ check that Txn_id has not been previously processed *******************

Elseif payment_status = "Pending" & pending_reason = "echeck" then
Response.write "echeck"
End if


elseif (objHttp.responseText = "INVALID") then

FromName="Auto Inventory Online"
FromAddress="support@autoinventoryonline.com"
Recipient="moojjoo@mmwebs.com"
Subject="Auto Inventory Online Subscription Invalid Information"

htmlText = "First Name" & ": " & Request.Form("first_name") & CHR(10)_
& "Last Name" & ": " & Request.Form("last_name") & CHR(10)_
& "Email Address" & ": " & Request.Form("payer_email") & CHR(10)_
& "City" & ": " & Request.Form("address_city") & CHR(10)_
& "State" & ": " & Request.Form("address_state") & CHR(10)_
& "Zip" & ": " & Request.Form("address_zip") & CHR(10)

Set Mailer = Server.CreateObject("SMTPsvg.Mailer")

Mailer.RemoteHost = "localhost"
Mailer.FromName = FromName
Mailer.FromAddress = FromAddress
Mailer.Recipient = Recipient
Mailer.AddBCC "Robert Dannelly","moojjoo@mmwebs.com"
Mailer.Subject = Subject
Mailer.BodyText = htmlText
Mailer.ContentType = "text/html"
Mailer.CharSet = 2
'Mailer.AddAttachment (Server.Mappath(""))
'returnValue = Mailer.AddExtraHeader("MIME-Version: 1.0")
'returnValue = Mailer.AddExtraHeader("Content-Type: text/html; charset=us-ascii")
if not Mailer.SendMail then
MailSent=1
else
MailSent=0
end if

Set Mailer = Nothing

Response.write("Invalid from HTTP objHttp")

else
Response.write ("Error Final") & "<br><br><br><br>"
Response.write (str)
end if
set objHttp = nothing
%>

<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

#8 moojjoo

moojjoo

    Member

  • Members
  • PipPip
  • 10 posts

Posted 24 January 2003 - 02:45 PM

By the way here is my parser...

http://www.autoinven...ine.com/val.asp

#9 markws

markws

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 24 January 2003 - 04:32 PM

I couldn't make the supplied sample code for ASP work with IPN. I tracked it down to the fact that the ServerXMLHTTP object wasn't passing any form data in the request. Another line is needed before the send. The extra line specifies that the request contains post data in the body.
oHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

It works like a charm once that is in there.
It's unbelievable that they supply sample code that doesn't work.

str = str & "&cmd=_notify-validate"
set oHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
oHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false
oHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
oHttp.Send str
Set oHttp = Nothing

oHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

#10 moojjoo

moojjoo

    Member

  • Members
  • PipPip
  • 10 posts

Posted 24 January 2003 - 08:15 PM

that did it that one line of code. If paypal is watching this board they should update there code example...

#11 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 27 January 2003 - 08:27 PM

Doing so.

We didn't see a single example at MSDN with this line.

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

#12 EliteWeaver

EliteWeaver

    Junior Member

  • Members
  • 239 posts

Posted 27 January 2003 - 08:48 PM

. . .or you could have based your code on my example ;-)

http://www.eliteweav.../ew-idh-1_5.zip

Marcus


#13 FPHowTo

FPHowTo

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 03 February 2003 - 09:43 AM

Having the same problem here. I'm using the test ASP script from www.eliteweaver.co.uk (awesome script and test facility by the way!).

When testing at www.eliteweaver.co.uk, I get the results below. I'm on a Win2k Server and I've checked the MSXML version and 4.0 is installed. I ran the sample code as is and also changed it to the following:

Set objHTTP = Server.CreateObject("MSXML2.XMLHTTP.4.0")

Here are the results from your test server. Any ideas??:

Your status report appears below:


IPN Creation Date: 08:35:30 Feb 03, 2003 PDT
IPN Expiration Date: 17:35:30 Feb 04, 2003 PDT
Send Count: 3
Target IPN Script: http://www.frontpage...t/ipnverify.asp


IPN Sent: 08:38:28 Feb 03, 2003 PDT
HTTP Status: HTTP/1.1 500 Internal Server Error
IPN Received: Your script did not reply!
Post Back: N/A


Variables Sent: 53
Variables Expected: 54
Variables Received: 0


String Length Sent: 1256
String Length Expected: 1277
String Length Received: 0


Desired Response: VERIFIED
Actual Response: None
Intentional Response: No!


Summary: Your script is not posting back to us!


#14 seb

seb

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 26 February 2003 - 05:32 AM

WHOO!

That line sorted it out!

I can't believe Paypal would have incorrect sample code. It's been almost a months since Patrick acknowledged this thread and their code samples at https://www.paypal.c...pop-outside#top are STILL incorrect.

#15 moojjoo

moojjoo

    Member

  • Members
  • PipPip
  • 10 posts

Posted 19 March 2003 - 06:26 AM

You are totally right they have not updated there code... What is up with that...?

' 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.open "POST", "http://www.eliteweaver.co.uk/testing/ipntest.php", false
objHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHttp.Send str

#16 mrfree

mrfree

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 06 April 2003 - 02:41 PM

I've tried everythig that is in all these posts with no luck.
Heres the code I'm using:

<%@Language=VBScript%><%

'#########################################################
'# #
'# Program : IPN Development Handler #
'# Author : Marcus Cicero #
'# File : notify.asp #
'# Function : Skeleton IPN Handler #
'# Version : 1.1 #
'# Last Modified : 01/14/2003 #
'# Copyright : EliteWeaver UK #
'# #
'#########################################################
'# THIS SCRIPT IS FREEWARE AND IS NOT FOR RE-SALE #
'#########################################################



'// 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")
Set objHTTP = Server.CreateObject("MSXML2.XMLHTTP.4.0")

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

'#########################################################
'# THIS SCRIPT IS FREEWARE AND IS NOT FOR RE-SALE #
'#########################################################

%>

MrFree

#17 lof

lof

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 08 April 2003 - 09:20 PM

Sam problem here.

I have an IPN that used to work just fine a month ago. Haven't changed a thing and now it is not posting back.
Now even the sample ASP code from eliteweaver does not post back.

What is happening?
Thanks,
LoF

LoF

#18 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 09 April 2003 - 11:11 AM

What is not POSTing back? Are you not getting IPNs from PayPal?

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

#19 lof

lof

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 09 April 2003 - 07:04 PM

Well,

It gets more interesting:
It is the Eliteweaver testbed that reports
IPN received: Your Script did not reply.
HTTP Status is 200 OK

Now, when tested on Paypal, transaction goes through fine.

Is there something wrong with the Eliteweaver? I LOVE the service. It makes life much easier whe testing this.

With Paypal there is a new thing I noticed. When I refund the money the IPN gets hit again, with the 'refund' payment_status. I did not notice this behaviour in the documentation. Same TxnID so it gets handled in the verification script.

LoF

LoF

#20 lof

lof

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 09 April 2003 - 08:13 PM

Just to follow up my previous post with some details:
I am using standard Eliteweaver code. Here is the snip that works on PP but not on EW

str = Request.Form
' post back to PayPal system to validate
str = str & "&cmd=_notify-validate"
Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.Open "POST", "http://www.eliteweaver.co.uk/testing/ipntest.php", False
objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHTTP.setRequestHeader "Host", "www.eliteweaver.co.uk"
objHTTP.setRequestHeader "Content-Length", Len(str)
objHTTP.Send str

Any ideas why?

Thanks
LoF

LoF




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users