Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 IPN
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

DarkDrift
Junior Member

USA
126 Posts

Posted - 11 January 2005 :  10:31:56  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
I am submitting my info to paypal but after a user purchases(on a test) it sends them to their paypal not my IPN i have it set in my paypal? Whats wrong

http://www.xcalliber.com - The Future of Boards

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 11 January 2005 :  10:34:35  Show Profile
You mean you're not receiving any info back from PayPal or that users are not being redirected back to the page on your site you've specified after making a purchase?


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 11 January 2005 :  14:45:22  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
Right after they buy something they get sent to their paypal account home NOT my IPN and i don't know whats wrong my sample code is:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="zzslowgangstazz@hotmail.com">
<input type="hidden" name="undefined_quantity" value="1">
<input type="hidden" name="item_name" value="BaseBall Hat">
<input type="hidden" name="item_number" value="123">
<input type="hidden" name="amount" value="1.00">
<input type="hidden" name="custom" value="merchant_custom_value">
<input type="hidden" name="invoice" value="merchant_invoice_12345">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="image_url" value="https://www.yoursite.com/logo.gif">
<input type="hidden" name=" no_note" value="0">
<input type="submit" value="submit"></form>


my IPN is:


<%
Dim Item_name, Item_number, Payment_status, Payment_amount
Dim Txn_id, Receiver_email, Payer_email
Dim objHttp, str

' read post from PayPal system and add 'cmd'
str = Request.Form & "&cmd=_notify-validate"

' post back to PayPal system to validate
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
' set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
' set objHttp = Server.CreateObject("Microsoft.XMLHTTP")
objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false
objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHttp.Send str

' assign posted variables to local variables
Item_name = Request.Form("item_name")
Item_number = Request.Form("item_number")
Payment_status = Request.Form("payment_status")
Payment_amount = Request.Form("mc_gross")
Payment_currency = Request.Form("mc_currency")
Txn_id = Request.Form("txn_id")
Receiver_email = Request.Form("receiver_email")
Payer_email = Request.Form("payer_email")

' 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 your Primary PayPal email
' check that Payment_amount/Payment_currency are correct
' process payment
Response.Write("COMPLETED")
elseif (objHttp.responseText = "INVALID") then
' log for manual investigation
Response.Write("Unverified")
else
' error
Response.Write("ERROR")
end if
set objHttp = nothing
%>

http://www.xcalliber.com - The Future of Boards
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 11 January 2005 :  22:28:49  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
The problem I see is that you do not have a return or cancel URL in your paypal button so paypal has no idea what to do with them...


<input type="hidden" name="return" value="http://www.domainname.com/success.asp">
<input type="hidden" name="cancel_return" value="http://www.domainname.com/cancel.asp">

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 12 January 2005 :  06:24:35  Show Profile
You don't actually get sent to your IPN, your IPN page fires behind the scenes and will not be visible to the user.

In addition to Brad's post, if you only require one return url for your PayPal account, you can set this up in your PayPal IPN settings as an alternative to the hidden value.

A good way to test your IPN is being hit is to put code in there to send you an email at certain points in the process

The UK MkIVs Forum

Edited by - DavidRhodes on 12 January 2005 06:26:18
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 12 January 2005 :  11:28:20  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
So i need to set my return url to my IPN.asp as well as my IPN in my paypal control panel?

http://www.xcalliber.com - The Future of Boards
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 12 January 2005 :  16:00:32  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
No, you do not want anyone to know what your IPN location is because they are then able to try and spoof your program. You want to just set the IPN in your account and as David said.. either enter the return url in your account or use the code I posted below in each paypal button. Here is a brief run down of how IPN works.


User goes to your site to click the pay now button.
They are sent to paypal to get payment information / login information
As soon as they click the confirm payment and there CC or paypal account is debited the amount you told paypal another process on paypal's system will request your IPN script and the user never goes to your IPN script. Your IPN script should then send back the information to paypal to verify that it is correct and when verifyed you are able to do whatever you are needing to do.

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.39 seconds. Powered By: Snitz Forums 2000 Version 3.4.07