|
|
|
Rank: Starting Member
Groups: Registered
Joined: 12/20/2002 Posts: 3 Location: ,
|
Greetings,
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' -->
<CFSET str="cmd=_notify-validate">
<CFLOOP INDEX="TheField" list="#Form.FieldNames#">
<CFSET str = str & "#LCase(TheField)#=#URLEncodedFormat(Evaluate(TheField))#">
</CFLOOP>
<CFIF IsDefined("FORM.payment_date")>
<CFSET str = str & "&payment_date=#URLEncodedFormat(Form.payment_date)#">
</CFIF>
<CFIF IsDefined("FORM.subscr_date")>
<CFSET str = str & "&subscr_date=#URLEncodedFormat(Form.subscr_date)#">
</CFIF>
<!-- Post back for validation -->
<cfhttp url="https://www.paypal.com/cgi-bin/webscr" method="POST" resolveurl="no">
<cfhttpparam type="FORMFIELD" name="cmd" value="#str#">
</CFHTTP>
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.
Particulars:
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!
Jason
|
|
|
|
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 12/20/2002 Posts: 3 Location: ,
|
Clarification: "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?
Thanks again,
Jason
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/16/2003 Posts: 14 Location: ,
|
jpsalit, 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. http://jshop.homeip.net/buy_paypal_ipn.cfm
Thanks Jason
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/16/2003 Posts: 10 Location: ,
|
Just downloaded your code. Figured for $20 what the hey. (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? Robert <blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> Originally posted by jmercmon[br]jpsalit, 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. http://jshop.homeip.net/buy_paypal_ipn.cfm
Thanks Jason <hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/16/2003 Posts: 14 Location: ,
|
Robert,
Please email me with your problem and I will help you resolve it. My email is included in the ipn code.
Jason
|
|
|
|
Guest
|
YAFVision Theme by Jaben Cargman (Tiny Gecko)Powered by YAF |
YAF © 2003-2009, Yet Another Forum.NETThis page was generated in 0.330 seconds.