If you have ever had to do credit card processing you most likely have come across this problem in the past. Payflow Pro is a popular gateway that you may have used back in the day and was previously owned by Verisign. Times have changed and now Paypal owns the software but what we are going to discuss should work for both. In the past (at least to my knowledge) you had to install the cfx_payflowpro tag on your ColdFusion server which ended up being a big pain, especially if you did not have rights to the server.
Today I am happy to announce that I have solved that problem. Credit card processing using Paypal's PayflowPro just got a lot easier. The reason for this is mainly due to Mark Mandel's Java Loader which is a library that handles creation of Java objects from external Java libraries. So how does it work? I have created a component using JavaLoader that will load the java class files and basically wraps the Java methods. This is great because now you can process credit cards without installing anything on the server.
The code is not quite ready to be released yet but I thought I would share a little code snippet. Imagine at the end of your checkout process you could provide real time processing with as little code as shown below.
2 <cfset payflowpro = createObject("component","PayflowPro").init("C:\Program Files\Apache Group\Apache2\htdocs\paypal\Verisign.jar")>
3 <!--- set the certificate path --->
4 <cfset payflowpro.setCertPath("C:\Program Files\Apache Group\Apache2\htdocs\paypal\certs")>
5 <!--- setup the context --->
6 <cfset payflowpro.createContext("test-payflow.verisign.com",443,30)>
7 <!--- the param list --->
8 <cfset payflowpro.setParamList(user,vendor,partner,pwd,trxtype,tender,acct,expdate,accttype,amt,currency,cvv2,street,city,state,country,zip,firstname,lastname,clientip,comment1,comment2,custref,invnum)>
9 <!--- submit the transaction, returns a string --->
10 <cfset response = payflowpro.submitTransaction()>
11 <!--- destroy the context --->
12 <cfset payflowpro.destroyContext()>
I am really looking for people who are looking to do processing with PayflowPro so I could get others thoughts on the library and how to use it. Any comments or questions are welcome so please feel free to leave them.

#1 by Steve Rittler on 2/9/07 - 9:28 AM
#2 by Dan on 2/9/07 - 11:10 AM
It still uses the PayflowPro java class files except this way you can just load them at runtime. I should have something for you begining of next week. Thanks for helping out as well. Before I let everyone use this I want to be sure it works correctly.
#3 by Dan on 2/9/07 - 2:44 PM
What do you do with the response. In other words when you submit a transaction Paypal (or Verisign) will send you back a response with a number of attributes. If the result is 0 it passed else there are hundreds of error codes for different reasons. Do you just tell the user that the transaction failed or do you display more information to the user based on the error code. If so I was thinking of creating a dbase table for the error code lookups. Please feel free to contact me on gmail or gtalk so we can talk more about this. (danvega at gmail dot com).
#4 by Steve on 2/9/07 - 2:48 PM
#5 by Dan on 2/9/07 - 2:55 PM
#6 by Steve on 2/9/07 - 5:45 PM
#7 by Steve on 2/9/07 - 5:47 PM
Page 51+ of the developer's guide (PDF)
#8 by Brian on 2/21/07 - 3:28 PM
Wow! This sounds like a life saver. Im looking to do processing with payflow pro.
I've been struggling with setting up Payflow pro on my current server, basically due to not being able to install Jar files and use other java functions such as createObject on the server. Im in the process of moving my site over to Hostmysite.com I would be pleased to implement code like this on my site and give you feedback. Thanks Dan,
Brian
#9 by Dan on 2/21/07 - 3:32 PM
Does Host My Site allow you access to createOjbect()? You will still need that ability but you wont have to install any jar files, you can load them at runtime.
#10 by Brian on 2/22/07 - 1:47 PM
#11 by Christine on 4/10/07 - 11:43 PM
Cheers
#12 by Andy on 8/14/07 - 9:28 PM
#13 by Dan on 8/14/07 - 9:34 PM