Jump to Page:   1
ColdFusion 5 User authentication failed   [ Edited ]
Options    Options  
mike_b
Visitor
Posts: 2
Registered: 06-27-2007


mike_b

Message 1 of 9

Viewed 6,727 times


Our team is trying to use ColdFusion 5 and Payflow Pro to process payments for a client's site. We've followed the directions in the sticky post "Posting transactions using HTTPS for US, UK and AU merchants using Payflow Pro - No SDK NEeded!" but can't get anything except "RESULT=1&RESPMSG=User authentication failed" back. We had been using a CFX tag on a Windows 2000 server, but it's being migrated to Windows 2003 and the tag no longer works there. So, we're sending the info via <cfhttp> and <cfhttpparam>.

To make sure it wasn't an authorization error or problem with our account, I downloaded the PHP examples and was able to successfully post. Seeing that worked, I went through both files and made sure everything was correct, and it is. Still unable to figure it out, I had both the PHP example and our ColdFusion test page post to a PHP page, which extracted the header info for comparison (I added line breaks in the last sections for ease of reading here):

PHP
HTTP_COOKIE:
HTTP_CONTENT_LENGTH: 308
HTTP_CONTENT_TYPE: text/namevalue
HTTP_ACCEPT: */*
HTTP_HOST: our.site.com
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
HTTP_X_VPS_TIMEOUT: 30
HTTP_X_VPS_VIT_OS_NAME: Linux
HTTP_X_VPS_VIT_OS_VERSION: RHEL 4
HTTP_X_VPS_VIT_CLIENT_TYPE: PHP/cURL
HTTP_X_VPS_VIT_CLIENT_VERSION: 0.01
HTTP_X_VPS_VIT_CLIENT_ARCHITECTURE: x86
HTTP_X_VPS_VIT_CLIENT_CERTIFICATION_ID: 13fda2433fc2123d8b191d2d011b7fdc
HTTP_X_VPS_VIT_INTEGRATION_PRODUCT: MyApplication
HTTP_X_VPS_VIT_INTEGRATION_VERSION: 0.01
HTTP_X_VPS_REQUEST_ID: 8209df3a21ff6739e93de88b5bfc9f07

USER=XXXXX&VENDOR=XXXXX&PARTNER=Verisign&PWD=XXXXX&
TENDER=C&TRXTYPE=S&ACCT=4111111111111111&EXPDATE=0109&
NAME=&AMT=1.00&CURRENCY=USD&COMMENT1=Sale order&
FIRSTNAME=John&LASTNAME=Doe&
STREET=Oak Streen 123&CITY=San Francisco&STATE=CA&ZIP=210202&COUNTRY=USUS&
CVV2=123&CLIENTIP=0.0.0.0&VERBOSITY=MEDIUM

ColdFusion
HTTP_COOKIE:
HTTP_CONNECTION: close, TE
HTTP_CONTENT_LENGTH: 304
HTTP_CONTENT_TYPE: text/namevalue
HTTP_ACCEPT: */*
HTTP_ACCEPT_ENCODING: deflate, gzip, x-gzip, compress, x-compress
HTTP_HOST: our.site.com
HTTP_TE: trailers, deflate, gzip, compress
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
HTTP_X_VPS_VIT_CLIENT_CERTIFICATION_ID: 13fda2433fc2123d8b191d2d011b7fdc
HTTP_X_VPS_CLIENT_TIMEOUT: 45
HTTP_X_VPS_REQUEST_ID: A23D74922749ACD754C4E20AAD93DB3E

USER=XXXXX&VENDOR=XXXXX&PARTNER=Verisign&PWD=XXXXX&
TENDER=C&TRXTYPE=S&ACCT=4111111111111111&EXPDATE=0109&
NAME=&AMT=1.00&CURRENCY=USD&COMMENT1=Sale order&
FIRSTNAME=John&LASTNAME=Doe&
STREET=Oak Streen 123&CITY=San Francisco&STATE=CA&ZIP=210202&COUNTRY=USUS&
CVV2=123&CLIENTIP=0.0.0.0&VERBOSITY=MEDIUM


Here's our ColdFusion code:

Code:
<cfscript>
    aBetterHash = hash(((attributes.ACCT * attributes.EXPDATE) * NOW()));
</cfscript>

<cfhttp url="https://pilot-payflowpro.verisign.com/transaction" method="post" throwonerror="yes" timeout="45">
   <cfhttpparam name="X-VPS-REQUEST-ID" type="CGI" value="#aBetterHash#" encoded="no">
   <cfhttpparam name="X-VPS-VIT-CLIENT-CERTIFICATION-ID" type="CGI" value="13fda2433fc2123d8b191d2d011b7fdc">
   <cfhttpparam name="Content-Type" type="CGI" value="text/namevalue" encoded="no">
   <cfhttpparam name="ACCEPT" type="CGI" value="*/*" encoded="no">
   <cfhttpparam name="USER-AGENT" type="cgi" value="Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" encoded="no">
   <cfhttpparam name="X-VPS-CLIENT-TIMEOUT" type="CGI" value="45">

   <cfhttpparam name="USER" type="formfield" value="XXXXX" encoded="no">
   <cfhttpparam name="VENDOR" type="formfield" value="XXXXX" encoded="no">
   <cfhttpparam name="PARTNER" type="formfield" value="Verisign" encoded="no">
   <cfhttpparam name="PWD" type="formfield" value="XXXXX" encoded="no">
   <cfhttpparam name="TENDER" type="formfield" value="C" encoded="no">
   <cfhttpparam name="TRXTYPE" type="formfield" value="S" encoded="no">
   <cfhttpparam name="ACCT" type="formfield" value="4111111111111111" encoded="no">
   <cfhttpparam name="EXPDATE" type="formfield" value="0109" encoded="no">
   <cfhttpparam name="NAME" type="formfield" value="" encoded="no">
   <cfhttpparam name="AMT" type="formfield" value="1.00" encoded="no">
   <cfhttpparam name="CURRENCY" type="formfield" value="USD" encoded="no">
   <cfhttpparam name="COMMENT1" type="formfield" value="Sale order" encoded="no">
   <cfhttpparam name="FIRSTNAME" type="formfield" value="John" encoded="no">
   <cfhttpparam name="LASTNAME" type="formfield" value="Doe" encoded="no">
   <cfhttpparam name="STREET" type="formfield" value="Oak Streen 123" encoded="no">
   <cfhttpparam name="CITY" type="formfield" value="San Francisco" encoded="no">
   <cfhttpparam name="STATE" type="formfield" value="CA" encoded="no">
   <cfhttpparam name="ZIP" type="formfield" value="210202" encoded="no">
   <cfhttpparam name="COUNTRY" type="formfield" value="USUS" encoded="no">
   <cfhttpparam name="CVV2" type="formfield" value="123" encoded="no">
   <cfhttpparam name="CLIENTIP" type="formfield" value="0.0.0.0" encoded="no">
   <cfhttpparam name="VERBOSITY" type="formfield" value="MEDIUM">
</cfhttp>

 



Any help with this is greatly appreciated.

Thanks!

Message Edited by mike_b on 06-27-200708:40 AM

Message Edited by mike_b on 06-27-200711:15 AM

Kudos!
06-27-2007 08:35 AM  
Re: ColdFusion 5 User authentication failed
Options    Options  
briguy
Newbie
Posts: 1
Registered: 06-27-2007


briguy

Message 2 of 9

Viewed 6,713 times


I've been having the exact same problem! My code looks similar so I can't offer any useful suggestions. If anyone has a CF5 solution, please post!!
Kudos!
06-27-2007 08:44 AM  
Re: ColdFusion 5 User authentication failed
Options    Options  
PayPal_ToddS Moderator
Moderator
Posts: 3878
Registered: 07-19-2006


PayPal_ToddS

Message 3 of 9

Viewed 6,699 times


User Auth issue is caused from one of the following:
 
1. Not passing the correct values for VENDOR, PARTNER, USER and PASSWORD.  Remember, USER and VENDOR are both your merchant ID unless you created a new USER for your Payflow transactions.
 
2. IP Restrictions on the account. Verify this in Manager.
 
3. Some older accounts have issues with the account using the new service.  My suggestion would be to create new USER and use this information.  This also allows you to change the Manager password without having to worry about changing the Payflow password.
1
Kudos!
06-27-2007 11:27 AM  
Re: ColdFusion 5 User authentication failed   [ Edited ]
Options    Options  
mike_b
Visitor
Posts: 2
Registered: 06-27-2007


mike_b

Message 4 of 9

Viewed 6,691 times


Hi Todd, thanks for the quick response.

1. My values are correct (verified it by using them in PHP, then copying them right into ColdFusion).
2. I checked and there are no IP Restrictions. (why would it work in PHP and not ColdFusion if this were the case?)
3. I did as you suggested and created a new user and plugged the values in: again, worked in PHP, not ColdFusion.

Any other ideas?

Message Edited by mike_b on 06-27-200701:57 PM

Kudos!
06-27-2007 11:57 AM  
Re: ColdFusion 5 User authentication failed
Options    Options  
PayPal_ToddS Moderator
Moderator
Posts: 3878
Registered: 07-19-2006


PayPal_ToddS

Message 5 of 9

Viewed 6,663 times


I'll have to check out logs as I believe the data coming via CF is not being created properly.  Can you do me a favor?  Create a ticket at https://www.paypal.com/mts under Contact Support and send me PM with the ticket # and your merchant Login ID.

Todd
1
Kudos!
06-28-2007 12:10 PM  
Re: ColdFusion 5 User authentication failed
Options    Options  
sbennett
Contributor
Posts: 16
Registered: 10-02-2006


sbennett

Message 6 of 9

Viewed 6,646 times


I think the problem is that CF5 does not support manipulation of the HTTP request headers in the CFHTTP tag. Can you post the working PHP code and I can convert it into working Coldfusion code for you. you will probably end up having to use something like this:
Code:
<cfobject type="COM"
     action="Create"
     name="objServerXMLHttp"
  class="msxml2.ServerXMLHTTP.3.0">
 
 <cfset objServerXMLHttp.open("POST", "https://pilot-payflowpro.verisign.com/transaction", False)>
 <cfset objServerXMLHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")>
 <cfset objServerXMLHttp.setRequestHeader("X-VPS-REQUEST-ID", "#aBetterHash#")>
 <cfset objServerXMLHttp.setRequestHeader("X-VPS-VIT-CLIENT-CERTIFICATION-ID", "13fda2433fc2123d8b191d2d011b7fdc")>
 <cfset objServerXMLHttp.setRequestHeader("ACCEPT", "*/*")>
 <cfset objServerXMLHttp.setRequestHeader("USER-AGENT", "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)")>
 <cfset objServerXMLHttp.setRequestHeader("X-VPS-CLIENT-TIMEOUT", "45")>
 <cfset objServerXMLHttp.send("#FormData#")>

 
Where the FormData variable is a url encoded variable string
 
 
Kudos!
06-29-2007 11:36 AM  
Re: ColdFusion 5 User authentication failed
Options    Options  
PayPal_ToddS Moderator
Moderator
Posts: 3878
Registered: 07-19-2006


PayPal_ToddS

Message 7 of 9

Viewed 6,644 times


PHP examples are available from the stickly posts at the top of the forum and in the HTTPS post too.
1
Kudos!
06-29-2007 12:05 PM  
Re: ColdFusion 5 User authentication failed
Options    Options  
sbennett
Contributor
Posts: 16
Registered: 10-02-2006


sbennett

Message 8 of 9

Viewed 6,635 times


Code:
<cfscript>
    aBetterHash = hash(((attributes.ACCT * attributes.EXPDATE) * NOW()));
</cfscript>

<cfset FormData="USER=#urlencodedformat(UserVariable)#">
<cfset FormData="#FormData#&VENDOR=#urlencodedformat(VENDORVariable)#">
<cfset FormData="#FormData#&PARTNER=#urlencodedformat(PARTNERVariable)#">
<cfset FormData="#FormData#&PWD=#urlencodedformat(PWDVariable)#">
<cfset FormData="#FormData#&TENDER=#urlencodedformat(TENDERVariable)#">
<cfset FormData="#FormData#&TRXTYPE=#urlencodedformat(TRXTYPEVariable)#">
<cfset FormData="#FormData#&ACCT=#urlencodedformat(ACCTVariable)#">
<cfset FormData="#FormData#&EXPDATE=#urlencodedformat(EXPDATEVariable)#">
<cfset FormData="#FormData#&NAME=#urlencodedformat(NAMEVariable)#">
<cfset FormData="#FormData#&AMT=#urlencodedformat(AMTVariable)#">
<cfset FormData="#FormData#&CURRENCY=#urlencodedformat(CURRENCYVariable)#">
<cfset FormData="#FormData#&COMMENT1=#urlencodedformat(COMMENT1Variable)#">
<cfset FormData="#FormData#&FIRSTNAME=#urlencodedformat(FIRSTNAMEVariable)#">
<cfset FormData="#FormData#&LASTNAME=#urlencodedformat(LASTNAMEVariable)#">
<cfset FormData="#FormData#&STREET=#urlencodedformat(STREETVariable)#">
<cfset FormData="#FormData#&CITY=#urlencodedformat(CITYVariable)#">
<cfset FormData="#FormData#&STATE=#urlencodedformat(STATEVariable)#">
<cfset FormData="#FormData#&ZIP=#urlencodedformat(ZIPVariable)#">
<cfset FormData="#FormData#&COUNTRY=#urlencodedformat(COUNTRYVariable)#">
<cfset FormData="#FormData#&CVV2=#urlencodedformat(CVV2Variable)#">
<cfset FormData="#FormData#&CLIENTIP=#urlencodedformat(CLIENTIPVariable)#">
<cfset FormData="#FormData#&VERBOSITY=#urlencodedformat(VERBOSITYVariable)#">


<cfobject type="COM"
     action="Create"
     name="objServerXMLHttp"
  class="msxml2.ServerXMLHTTP.3.0">
 
 <cfset objServerXMLHttp.open("POST", "https://pilot-payflowpro.verisign.com/transaction", False)>
 <cfset objServerXMLHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")>
 <cfset objServerXMLHttp.setRequestHeader("X-VPS-REQUEST-ID", "#aBetterHash#")>
 <cfset objServerXMLHttp.setRequestHeader("X-VPS-VIT-CLIENT-CERTIFICATION-ID", "13fda2433fc2123d8b191d2d011b7fdc")>
 <cfset objServerXMLHttp.setRequestHeader("ACCEPT", "*/*")>
 <cfset objServerXMLHttp.setRequestHeader("USER-AGENT", "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)")>
 <cfset objServerXMLHttp.setRequestHeader("X-VPS-CLIENT-TIMEOUT", "45")>
 <cfset objServerXMLHttp.send("#FormData#")>
<!--- Response should be in one of the following two variables ---> 
<cfset ResponseXML = objServerXMLHttp.responseXML.xml>
<cfset ResponseText = objServerXMLHttp.responseText>

 You should have to do something like that. Keep in mind I put this together quickly and did not test it so there may be some small glitches in the code above but I have done this many times in the past and this should get you on the right path.
 
Of course if you just had CFMX7 you could change all the <cfhttpparam> tags in your code that are set to type="CGI" to be type="HEADER" and that would do the trick. But since you seem to be stuck with an old version of CF server, this work around will have to do.
 
-Scott
 
 
Kudos!
06-29-2007 01:22 PM  
Re: ColdFusion 5 User authentication failed
Options    Options  
ecropolis
Visitor
Posts: 2
Registered: 08-28-2007


ecropolis

Message 9 of 9

Viewed 5,629 times


This seemed to do the trick:

<cfhttpparam type="header" name="Accept-Encoding" value="*" />
<cfhttpparam type="Header" name="TE" value="deflate;q=0">

I didn't get authorization failed but I'm getting FileContent =
Empty XML data
Works in v7 not in v5

Kudos!
11-27-2007 11:34 AM  
Jump to Page:   1
Copyright © PayPal. All Rights Reserved. By using this site, you agree to be bound by PayPal's Legal Disclaimer, User Agreement, and Privacy Policy. This site is subject to change without notice. All other products and company names are trademarks of their respective corporations.