Friday, October 10, 2008    
Home My Books Blog ColdFusion About Me Back    

Calendar
<< Feb 2006 >>
S M T W T F S
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28        

Search

Categories
 • Acrobat (2) [RSS]
 • Adobe (68) [RSS]
 • AdobeMAX06 (45) [RSS]
 • AdobeMAX07 (59) [RSS]
 • AdobeMAX08 (25) [RSS]
 • AIR (134) [RSS]
 • Appearances (122) [RSS]
 • Books (69) [RSS]
 • CFEclipse (14) [RSS]
 • ColdFusion (1154) [RSS]
 • Data Services (13) [RSS]
 • Fish Tank (2) [RSS]
 • Flash (106) [RSS]
 • Flex (372) [RSS]
 • Home Automation (3) [RSS]
 • Jobs (96) [RSS]
 • JRun (13) [RSS]
 • Labs (27) [RSS]
 • LiveCycle (22) [RSS]
 • MAX (160) [RSS]
 • Regular Expressions (13) [RSS]
 • RIA (11) [RSS]
 • SQL (38) [RSS]
 • Stuff (505) [RSS]
 • Tips (CF Studio) (80) [RSS]
 • Tips (CF) (795) [RSS]
 • Tips (Dreamweaver) (91) [RSS]
 • Tips (Flex Builder) (2) [RSS]
 • Using CF (137) [RSS]
 • Wireless (99) [RSS]

Other BLOGs
 • Charlie Arehart
 • Lee Brimelow
 • Ray Camden
 • Christophe Coenraets
 • Sean Corfield
 • Mihai Corlan
 • Cornel Creanga
 • John Dowdell
 • Danny Dura
 • Enrique Duvos
 • Steven Erat
 • Kevin Hoyt
 • Serge Jespers
 • Adam Lehman
 • Duane Nickull
 • Miti Pricope
 • Andrew Shorten
 • Ryan Stewart
 • James Ward
 • Greg Wilson
 • Full As A Goog

RSS Feeds
 • Feed
 • Subscribe

Join my mailing list and find out about new books and other topics of interest.

Thoughts, ideas, tips, musings, and pontifications (not necessarily in that order) by Ben Forta ...
NOTE: This is my personal blog, and the opinions and statements voiced here are my own.

Viewing By Entry / Main
February 23, 2006

Using PayPal In ColdFusion Applications

The PayPal Integration Center provides SDKs that can be used to accept PayPal payments from within your applications. ColdFusion MX 7 is a supported platform (it uses the Java SDK), and a ColdFusion Component is also included (it uses the Java APIs, and exposes simple high-level methods that can be invoked from within your code). Sample CFM code is also included.

TrackBacks
There are no trackbacks for this entry.

No trackback URL. Trackbacks are only allowed via interactive form.

Comments
Jared also has a good library over on his site for dealing with paypal.

http://www.web-relevant.com/web-relevant/index.cfm...
# Posted By simeon | 2/23/06 5:06 PM
Thanks Sim!

Ben, the sample code that comes from PayPal has never run for me... there are several steps involved with getting it to run with CFMX, often including altering the AXIS version that CFMX is using system-wide. The problem with that is the fact that unless you're working with a dedicated server and are brave enough to dig into it's gutz, you probably won't be able to use the PayPal SDK with CFMX.

It's compiled against AXIS 1.3, and CFMX comes with an incompatible version.

PayPalMX is built around the standard PayPal UI and their PDT and IPN technologies that use form posts and URL variables to get and validate data about transactions. For PDT, that happens when the buyer is returned to the seller's website. IPN is an asynchronous process wherein PayPal formulates a POST and sends it to a specific URL on your site to be re-packaged and sent back to them. They then pass back a pass/fail message if the transaction was good or not.

My intention for the next version of PayPalMX is to build wrappers with a combination of Java and CFCs to enable the non-invasive use of the correct version of AXIS with CFMX and the PayPal web-services API so that people can avail themselves of this very, very powerful tool from PayPal without having to unzip JAR files and edit their contents or swap files out of their web-inf folders.

Incidentally, use of the PayPal Pro service (required for to use the API) costs $20/month. Much cheaper than a merchant account, but still something that needs to be considered.

Thanks!

J
# Posted By Jared Rypka-Hauer | 2/23/06 5:13 PM
Thanks for the comments guys. Someone just e-mailed me to ask about PayPal, which is why I made the post, and your added input is appreciated.

--- Ben
# Posted By Ben Forta | 2/23/06 5:21 PM
The IPN code never seems to work either, see this forum for the appalling CF help (i.e., zero):

http://paypaldev.org/forum.asp?FORUM_ID=22

I always got an invalid response because it wasn't sending back the data exactly as received for some unknown reason. I gave up.

This is just one example of why coldfusion has such poor pickup, I think. All the other code types work and are supported. I really don't understand why MM doesn't have a tiny team that actively seeks out and works on tools and issues like this, much like Mozilla has a team that works with banks and such to ensure compatability. They should be pumping out basic tools and kits and integration code for all manner of needs.
# Posted By stylo | 2/23/06 10:39 PM
Stylo has a good point. Adobe should be providing code sets/examples for the Paypal API, other payment gateways (worldpay), and possibly even the ebay API.

Adobe should actually be going to these companies and working with them to get it right. It may actually be a good return on investment.

Adam
# Posted By Adam Reynolds | 2/24/06 5:11 AM
Agreement with Stylo and Adam. I'm on the cusp of adding a Payment gateway to our site (on a budget) and I'm having a difficult time finding an appropriate solution.

The funny thing is, we were investigating going with Verisign Payflow Link in order to "get away from Paypal". Then.. whaddayaknow... Paypal goes and buys Verisign Payments. Now I feel like waiting to see what sort of payment portal emerges from the union.
# Posted By Steve | 2/24/06 11:07 AM
But it's not Adobe's product. PayPal SHOULD be doing better research and producing better code for their SDK. It strikes me as very strange to suggest Adobe should write an SDK for PayPal... like people demanding an airline start providing parachutes. It sends the wrong message... if they're going to package the PayPal API (which I remind you is written to an incmpatible AXIS implementation), why not Google's API, MSN, Yahoo, Flex, hell let's just dump all the other APIs in the world into the CF goodie bag.

I can say I know from being in communication with PayPal that some Adobe names we'd all recognize have helped them iron out the innards of their CF SDK, it just didn't work out very well anyway. :)

Laterz...
# Posted By Jared Rypka-Hauer | 2/24/06 11:25 AM
I just happen to see this today, its a tutorial with using CF and Paypal. http://tutorial23.easycfm.com/

Pablo's new venture may interest you as well -
www.freecoldfusionhosting.com
# Posted By Mike Collins | 2/24/06 4:27 PM
But it's not Adobe's product. It sends the wrong message...
-no, not having basic code is sending the wrong message and thus people don't use Adobe's product, cf. It's like using early Mozilla with your bank, didn't work, so went back to IE. Done. Today people just use php because there is code and help. It would be great if everyone thought to provide a cf solution first, but they don't and often don't provide one at all. Thus Adobe should have an active team providing solutions.

>>I just happen to see this today, its a tutorial with using CF and Paypal. http://tutorial23.easycfm.com/

-yeah, and the code doesn't work :-(
# Posted By stylo | 2/24/06 9:56 PM
I'm getting PayPal's IPN to post back VARIFIED with the URL hardcoded, but for some reason I get a Connection Timeout when using the URL in a cfhttp call inside a .cfm file. I also tried a cfhttp request on another website with the same result. Since this message is a cf result message, I'm beginning to think it's a cf issue. Could it be a webserver or java configuration issue? Please visit this link for details. Any clues/thoughts/suggestions may help!

http://www.easycfm.com/forums/viewmessages.cfm?For...
# Posted By silroc | 2/25/06 1:34 AM
I remember a recent timeout issue with cfhttp. We were using milliseconds instead of seconds. Depending on your version you may not have the fix. Try using 10000 for a 10 second timeout.

Also, I haven't spent much time with using Paypal. If you have a brief description of the issue I can look into getting it addressed. I agree it does seem important that we have a working example. So far I see an issue with Axis version. Has anyone tried using a later Axis version with CFMX?
# Posted By Mike Collins | 2/26/06 12:18 PM
Thanks for the post but putting in 10000 didn't get it either. If I have the cfhttp timeout set to 60 seconds, should I have to wait 60 seconds before getting the Connection Timeout error message? It comes back immediately, even when I set it to 10000.
# Posted By silroc | 2/27/06 9:01 PM
Problem solved! Ya!

FYI, what I ended up doing was reinstalling coldfusion, updating my existing install without first manually stopping cf from windows control panel/admin tools/services. The cf install program seems to handle this. CFHTTP works beautifully now.

Thanks for the responses.
# Posted By silroc | 2/28/06 12:51 PM
PayPals ColdFusion SDK worked great.
# Posted By Ryan | 6/12/08 12:31 AM
Which SDK. they say that that they don't use an SDK anymore. Everything is CFHTTP
# Posted By Rusty | 9/23/08 11:33 AM

  © Copyright 1997-2008 Ben Forta, All Rights Reserved