Cold Fusion IPN Code Does Not Work!
Posted 27 December 2002 - 02:20 PM
I've been trying to make the available sample IPN Cold Fusion code work (from PayPal, from easycfm.com, from superfreaker.com, etc.) for the last couple of days. None of my debugging attemps has really shed any light on what the problem might be. Currently, this code seems to fail while attempting to reply back to PayPal.
<!-- Read post from PayPal system and add 'cmd' -->
<CFLOOP INDEX="TheField" list="#Form.FieldNames#">
<CFSET str = str & "#LCase(TheField)#=#URLEncodedFormat(Evaluate(TheField))#">
<CFSET str = str & "&payment_date=#URLEncodedFormat(Form.payment_date)#">
<CFSET str = str & "&subscr_date=#URLEncodedFormat(Form.subscr_date)#">
<!-- Post back for validation -->
<cfhttp url="https://www.paypal.com/cgi-bin/webscr" method="POST" resolveurl="no">
<cfhttpparam type="FORMFIELD" name="cmd" value="#str#">
My CF logs indicate the error "(code segment has wrong length)" when trying to process this page. Interestingly, part of this code sends an email on failure and I do get a valid Transaction ID from this code when testing with eliteweaver; however, I do NOT get the Transaction ID when testing with PayPal - live!?
Does anyone know what that means? Has anyone encountered this problem? Can anyone debug that Loop or the Post-Back? This is terribly frustrating as it seems there are only a couple of us out there having this same problem and no real answers on the horrizon.
Cold Fusion MX
Windows 2K Enterprise Server (SP2)
IIS 5.0 (totally patched)
IIS Lockdown tool as Exchange Webmail Server
URLSCAN (default from Lockdown tool)
Exchange 2000 (SP3)
Trend Antivirus (Server & for Exchange)
IPN Code is for a Subscription Transaction
Help! Thanks in advance for any guidance!
Posted 27 December 2002 - 03:09 PM
"Interestingly, part of this code sends an email on failure and I do get a valid Transaction ID from this code when testing with eliteweaver; however, I do NOT get the Transaction ID when testing with PayPal - live!?"
Indicates that even the partially working aspects will fail when processed directly by PayPal. Has anything changed since these demo's were posted? And if so, how come all the working systems didn't break?
Posted 16 March 2003 - 11:17 AM
(It would be really nice if you used indents around if's so we can read it. )
However, your code does not overcome the basic problem I have with the setup. When originally getting the message from PP I do NOT get a valid #form.fieldnames#
Can you explain that?
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by jmercmon
Please consider trying my custom code I have written for handling IPN's from Paypal. It is written in CF and very easy to use and customize.
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users