I KNOW that someone here has cracked this nut before. I have
integrated PayPal into a couple of CF sites recently, but I am having
problems with the IPN portion. I am using OpenSSL and PayPal's public
key to send the transaction (on the fly prices, so it's not a "copy
paste" operation of PayPal's encrypted pay now buttons.
Again, no problem SENDING the transaction and having the payment go
through.
The problem is that I can't seem to get the IPN response to work when
the transaction comes back. I've tried multiple solutions and code
snippets from around the web (yes, PayPal's solution failed).
So, anyone have any luck with this? Here are two code examples, both
return and "INVALID" response when trying to validate the payment in
real time.
<!--- read post from PayPal system and add 'cmd'
--->
<CFSET str="cmd=_notify-validate">
<CFLOOP collection=#FORM# item="field">
<CFIF FORM[field] NEQ "FIELDNAMES" AND FORM[field]
NEQ "CHARSET">
<CFSET str = str &
"&#LCase(field)#=#URLEncodedFormat(FORM[field])#">
</CFIF>
</CFLOOP>
<!--- post back to PayPal system to validate
--->
<CFHTTP URL="https://www.paypal.com/cgi-bin/webscr?#str#"
METHOD="GET" RESOLVEURL="false"></CFHTTP>
#CFHTTP.FileContent#
HTTP content is "INVALID"
<cfset StructDelete(form, "fieldnames", false)>
<cfhttp url="https://www.paypal.com/cgi-bin/webscr?" method="post"
resolveurl="false" throwonerror="yes" timeout="5">
<cfhttpparam name="cmd" type="formfield"
value="_notify-validate">
<cfloop index="thefield"
list="#StructKeyList(form)#">
<cfhttpparam name="#LCase(thefield)#" type="formfield"
value="#form[thefield]#">
</cfloop>
</cfhttp>
#CFHTTP.FileContent#
HTTP content is "INVALID"
_____________________
Derrick Peavy
[email protected]
404-786-5036
_____________________
On Jun 5, 2009, at 2:01 AM, Mike Staver wrote:
Let's say I'd like to write code in ColdFusion, compile it to
obfuscate the source, and build an installer with something like
Install Shield so it could be installed onto any web server. I've
never used cfcompile before, and according to Adobe, a web server
path is required:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=deploying_5.html
I know that cfcompile turns CFML to java byte code in the form of
classes - but what does the utility need the web server path for?
Would there be a way to make it dynamic?
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------