Link to home
Create AccountLog in
E-Commerce

E-Commerce

--

Questions

--

Followers

Top Experts

Avatar of jawadashraf78
jawadashraf78🇵🇰

I am not getting IPN response from sandbox paypal
Hello
I created a test account and i enabled the IPN and also specified the link where the notification should be sent.
And in my transaction I specified the notify_url also, which is my local system url, I am not getting the notification.
I tried this on production system also but no response.
What could be the problem, Its urgent I have to deliver the site in 3 days.
Thanks

<input type="hidden" name="cmd" value="_cart">
        <input type="hidden" name="business" value="jawada_1196344506_biz@gmail.com">
        
        <input type="hidden" name="upload" value="1">
        
        <input type="hidden" name="amount" value="143.09">
 
        <input type="hidden" name="no_shipping" value="1">
        <input type="hidden" name="return" value="http://localhost:49166/client/paymentsuccess.aspx">
        <input type="hidden" name="rm" value="2">
        <input type="hidden" name="notify_url" value="http://localhost:49166/client/IPNHandler.aspx">
        <input type="hidden" name="cancel_return" value="http://localhost:49166/client/default.aspx">
        <input type="hidden" name="invoice" value="15">
        
        <input type="hidden" name="currency_code" value="USD">
        <input type="hidden" name="custom" value="22">
       
        <input type="hidden" name="item_name_1" value="Honda Rent">
 
	<input type="hidden" name="item_number_1" value="2">
	<input type="hidden" name="amount_1" value="20.99">
	<input type="hidden" name="quantity_1" value="1">
	<input type="hidden" name="tax_1" value="0">
	<input type="hidden" name="item_name_2" value="Delivery Services">
	<input type="hidden" name="item_number_2" value="4">
	<input type="hidden" name="amount_2" value="111.00">
	<input type="hidden" name="quantity_2" value="1">
	<input type="hidden" name="tax_2" value="11.10">

Open in new window

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of freymishfreymish🇺🇸

What does you IPNhandler application do?  What I am getting at is how do you know it's not responding?

Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

On page load event I am writing to a file that "Page is being accessed" and then I am performing database entries.

Avatar of freymishfreymish🇺🇸

     <input type="hidden" name="notify_url" value="http://localhost:49166/client/IPNHandler.aspx">

Is this the actual address you are sending to PayPal?  localhost?

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

yes, this is the address and i tried on other address too
http://d2002537.u351.kensoft.net/Client/IPNHandler.aspx, this the hosted site address and its for testing purpose

ASKER CERTIFIED SOLUTION
Avatar of freymishfreymish🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

Thanks
http://d2002537.u351.kensoft.net/Client/IPNHandler.aspx
it is only to process information collected from paypal,
the issue can be the authentication.
How can I pass authentication info to paypal, so that in return i can log them in to the page.

One thing regarding localhost, when i passed return_url (not notify_url) it was
localhost:49165 , and it worked, i mean after payment being made the button appears to get back to the return url, and that button redirected to local system, What u said is that it wont work but it worked.
What could it be.

Avatar of freymishfreymish🇺🇸

There are two test for legitmacy.  The first is a shared secret that I set up with PayPal, and the second is a custom variable that comtains a timestamp+ipaddress of the person making the payment.  With these two things in place I can be pretty certain that no one will spoof any transactions.  

So First I create an entry in a table with the integcheck field populated with my timestamp+ipaddress info.  Then I post that info to PayPal and they post it back with their response to the payment attempt.  The code below tests the shared secret first and then updates the PayPal table with the payment information.  After that I notify the payor that the transaction has succeded.
<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
	Mailer.FromName   = "From Mail"
	Mailer.FromAddress = "return address"
	Mailer.RemoteHost = "localhost"
	Mailer.AddRecipient "me", "Me@mydomain.com"
	Mailer.subject = "IPN Post"
if request("secret") = "randomlygenerated or hard coded secret" then
		set cnn = server.CreateObject("adodb.connection")
		cnn.open "dsn=dsnname"
		Set rs = server.CreateObject("adodb.recordset")
		rs.ActiveConnection = cnn
		sql = "update paypal set payment_date ='" & date & "', payment_status='" & request("payment_status") & "', first_name='" & request("first_name") & "', last_name='" & request("last_name") & "', payer_email='" & request("payer_email") & "', payment_type='" & request("payment_type") & "', payment_gross='" & request("payment_gross") & "', payer_status='" & request("payer_status") & "', pending_reason='" & request("pending_reason") & "' where integcheck='" & request("custom") & "'"
		cnn.execute(sql)
		Mailer.BodyText = sql
		Mailer.SendMail
Else
	Mailer.Subject = "bad secret"
	Mailer.SendMail
end if
%>

Open in new window


Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of freymishfreymish🇺🇸

..."After that I notify the payor that the transaction has succeded."

Actually, it notifies me, not the payor. My mistake..

Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

thanks
first let me tell u that when u told me about localhost problem, i checked it with and without port and it worked in both cases , i tried this for return_url, after setting auto return is on.
And it redirected successfully and the url which i specified was in password needed area but it didnt ask for any password and page was displayed with success message. the link was localhost/ebilling/client/paymentsuccess.aspx.
Another thing to check
I am developing this site on Vista, it has different folder rights issue, and wwwroot folder has tighter security, so i thought it may be the problem so i used localhost:41975 which is outside wwwroot, but still no response.
Is there any setting problem on paypal, i have already turned on IPN on paypal and also specified the url
, is there any thing else needed to configure

Thanks

Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

And i also specified url in non password area, but still no response
localhost/ebilling/ipnhandler.aspx, its a non password area.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of freymishfreymish🇺🇸


	<a>Annual Membership</a>
	<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
	<input type="hidden" name="cmd" value="_xclick">
	<input type="hidden" name="business" value="PaypalAccount@mydomain.com">
	<input type="hidden" name="item_name" value="Donation">
	<input type="hidden" name="amount" value="35.00">
	<input type="hidden" name="page_style" value="PayPal">
<input type="hidden" name="no_shipping" value="1">
					<input type="hidden" name="no_note" value="1">
					<input type="hidden" name="currency_code" value="USD">
					<input type="hidden" name="tax" value="0">
					<% response.write("<input type='hidden' name='custom' value='" & session("identifier") & "'>") %>
					<input type="hidden" name="lc" value="US">
					<input type="hidden" name="bn" value="PP-DonationsBF">
					<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
				</form>

Open in new window


Avatar of freymishfreymish🇺🇸

Oops!  A slip of the hand there, but that's the payment button code I am using. I told the PayPal server which shared secret and IPN page to use in my profile info so they check my e-mail address and act according to those parameters.

It's been a while since I did this so I am glad to refresh myself on it too;)

Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

I didnt get that what you want to tell me in the last comment.
I am sending data to sandbox.paypal, and i am sending a cart data.
Is vista an issue?

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of freymishfreymish🇺🇸

I honestly don't know if Vista would be the issue.  It seems unlikely as I can hit the IPN page from here.

As for the pervious comment...  I created this code while using the Sandbox and then converted it over to their live site.  I created a group of predefined buttons to send the payments.  The important part of this is that I specified the URL of my IPN handler page in my profile on PayPal so it knows what page to post its responses to.  Does that help?

Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

As you said earlier , i tried to put ipnhandler page in a non password area, but didnt work,
any idea what could it be

Avatar of freymishfreymish🇺🇸

How about putting a simple page in the non-pasword area for starters and see what happens?  Something that just says "hello world" or the like.  From there perhaps we can begin to figure out where the IPN process is breaking.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

I did this i just wrote a line and ended the load event function
just writing a line to a log file and then "exit sub"

Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

OK
It seems to be happening
I moved my page on the hosting site, and did the  same removed my page from non password area and its been accessed,
now i will execute the  complete code, let me try.
Please tell me that how can i stop someone from directly accessing ipn page, u talked about secret share, how to implement it, and i will close the question then
thanks for ur time.

Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

sorry "removed my page from non password area "
I meant to say
"removed my page from password area "

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

i tried again and the page is not accessed this time in the same time, did u try to access the page at
10:05 am, coz my log showing that the page was accessed at 10:05 am

Avatar of freymishfreymish🇺🇸

Yes, I am pretty sure that was me hitting your page.

If you go to your PayPal account and into the profile section there is a place where you can edit your IPN settings.  What I did to prevent people from hitting my page at random was tell PayPal to post to the IPN page with a variable attached, like this:
http://www.mydomain.com/IPNpost.asp?secret=098450893nb0vndufhna0uchq0t78ycnqor

In the code of your IPN page pull the contents of the "secret" variable and match it to the variable you created.  That's how I have done it.

Avatar of jawadashraf78jawadashraf78🇵🇰

ASKER

Thanks
Your overall conversation made me to think to change the page fron password area to non password area, and it worked on remote hosting machine.
Thanks my issue is solved and thanks for the secret also

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.

E-Commerce

E-Commerce

--

Questions

--

Followers

Top Experts

Electronic commerce (e-commerce) is the trading in products or services using computer networks, such as the Internet. E-commerce draws on technologies such as mobile commerce, electronic funds transfer (EFT), supply chain management, online transaction processing, electronic data interchange (EDI), inventory management systems, and automated data collection systems. Use this topic to discuss online shopping carts, online marketplaces, and e-commerce platforms.