RE: Anyone written a PayPal IPN for ODBScript?, John Kinciad, 02-22-2006
by Roger Harris, February 23, 2006 12:18
There is a posting linked below about this. Here's the basic code that does the "post back" to PayPal to verify the transaction:<% SET inVars="cmd=_notify-validate"; EACHINPUT; SET inVars=$inVars$"&"$input_variable$"="$url($input_value$); ENDINPUT;Other than that, you just need a list of the variable names that PayPal sends (which are documented in their downloadble manual), and the script can be written as if the data was passed in from a form (i.e., it's a standard HTTP "post" request).
IF $txStatus$ = "VERIFIED"; ... (the transaction is valid) ELSE; ... (the transaction is not valid) ENDIF; %>
There isn't any defined output that the script needs to produce, but you do need to have the script output some text (it doesn't matter what it is -- I just output "OK"), so that PayPal will receive a successful response. (Otherwise, ODBscript will not send back any response headers, which is treated as a failed request, so PayPal will keep sending the IPN over a period of time, looking for a successful response.)
Read previous forum thread here
Name E-mail optional TopicMessage:
HTTP Link: Link text: