Payflow Pro Made Easy

Word Count: 344

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.

<!--- create an instance of our PayflowPro component --->
   <cfset payflowpro = createObject("component","PayflowPro").init("C:\Program Files\Apache Group\Apache2\htdocs\paypal\Verisign.jar")>
   <!--- set the certificate path --->
   <cfset payflowpro.setCertPath("C:\Program Files\Apache Group\Apache2\htdocs\paypal\certs")>
   <!--- setup the context --->
   <cfset payflowpro.createContext("test-payflow.verisign.com",443,30)>   
   <!--- the param list --->
   <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)>
   <!--- submit the transaction, returns a string --->
   <cfset response = payflowpro.submitTransaction()>
   <!--- destroy the context --->
   <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.

Comments

#1 Posted By: Brian Posted On: 2/21/07 3:28 PM
Hi Dan,

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
#2 Posted By: Dan Posted On: 2/21/07 3:32 PM |
Author Comment
Brian,
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.
#3 Posted By: Brian Posted On: 2/22/07 1:47 PM
Yeah, their tech guys have assured me that they have coldfusion sandboxes setup in such a way that I can use creatObject without having to purchase a dedicated server... which I coudnt afford. do you have a different hosting recommendation?
#4 Posted By: Christine Posted On: 4/10/07 11:43 PM
Hi - I'm currently having issues with the PayFlowPro CFX tag on our CFMX7 clustered environment, I'd love to try your way and see if it fixed the issues. Can you possible email me the code?

Cheers
#5 Posted By: Andy Posted On: 8/14/07 9:28 PM
ARRRRRRRRRRGH. I have a customer I'm building a site for, and they have a hosting service that won't allow us to install anything. I've seen the https samples, but seeing how they're in PHP and I REALLY don't have time to learn it (I'd have to convert to CFML anyway), I'm REALLY keen on this wrapper approach.
#6 Posted By: Dan Posted On: 8/14/07 9:34 PM |
Author Comment
This is one of the reason I built this utility in the first place. Please give it a try and let me know if it works for you. There is more information about downloading it & using it on this site if you select the cfpayflowpro category on the right.


Post Your Comment







Show Captcha

If you subscribe, any new posts to this thread will be sent to your email address.

Copyright © 2007 Dan Vega | BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.