Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Making PayFlow Pro Https call using Coldfusion

Posted on 2009-07-10
2
Medium Priority
?
1,146 Views
Last Modified: 2012-05-07
Paypal is no longer supporting the CFX tag that many CF developers have used to execute credit card transactions starting Sept 2009.  As PayPal generally sucks, there is very little reliable information on how to use PayPals API to make these transactions work via ColdFusion.  I cant possibly be the only CF developer with this problem.

Any help would be greatly appreciated.  The code I'm using to execute test transactions is below.   I seem to be able to connect but I'm constantly getting the following error:

RESULT=1&RESPMSG=User authentication failed

The documentation says to use the same login parameters that I use to login to the PayPal Manager (the GUI used to manage my account), but I keep getting authentication errors. Please note that the VENDOR and USERNAME are one and the same, this is supposed to be OK, or at least that's what the documentation says.  Assuming my login parameters are correct, what could I possibly be doing wrong.
<cfset username = "MyUserName">
<cfset password = "MyPassword">
<cfset partner = "verisign">
<cfset vendor = "MyUserName">
<cfset amount = "1.66">
<cfset ExpirationDate = "1015">
<cfset CCnumber = "4111111111111111">
 
<CFSET PARAM="USER=#username#&PWD=#password#&PARTNER=#partner#&VENDOR=#username#&TRXTYPE=S&TENDER=C&AMT=#amount#&EXPDATE=#ExpirationDate#&ACCT=#CCnumber#">
<cfoutput>param = #PARAM#</cfoutput>
<hr>
 
<CFHTTP url="https://pilot-payflowpro.paypal.com" method="post" resolveurl="no" timeout="30" port="443">
<CFHTTPPARAM type="header" name="X-VPS-REQUEST-ID" value="#CreateUUID()#">
<CFHTTPPARAM type="header" name="X-VPS-CLIENT-TIMEOUT" value="30">
<CFHTTPPARAM type="header" name="Content-Length" value="200">
<CFHTTPPARAM type="header" name="Content-Type" value="text/namevalue">
<cfhttpparam type="header" name="Host" value="pilot-payflowpro.paypal.com">
<cfhttpparam type="header" name="X-VPS-VITCLIENTCERTIFICATION-ID" VALUE="verisignnyplcommerce">
<CFHTTPPARAM type="body" name="" value="#PARAM#">
</CFHTTP>
 
<cfoutput>#cfhttp.filecontent#</cfoutput>

Open in new window

0
Comment
Question by:xamian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

Expert Comment

by:SidFishes
ID: 24823499
looks ok to me...pretty much what i use.

First thing to check is that Uname is case sensitive (possibly vendor as well)

0
 
LVL 1

Accepted Solution

by:
xamian earned 0 total points
ID: 24824906
Nevermind....
So it turns out that CF5 doesn't support the manipulation of HTTP request headers.  When I moved my test page from our CF5 server to one of our CF7 servers it worked like a charm.
0

Featured Post

Give Your Engineering Team a Productivity Boost

Learn why container technology is so powerful and how it can provide your team with productivity gains and other benefits.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question