Update 8/27/09: I am available for consulting to help with this issue, I’ve helped quite a few people out already. My rate is $75/hr, and you can contact me at ryan@stillnet.org. -thanks


If you use the CFX_PayFlowPro tag to connect to PayPal’s PayFlowPro service (formerly owned by Verisign) you should be aware that it will stop working in September of 2009. You must transition to one of their newer connection methods before then.

Here is a drop in replacement custom tag you can use. You should be able to pretty much just change your code from “CFX_PayFlowPro” to “CF_PayFlowPro”. If you run into any issues and end up modifying the tag, please let me know and I’ll get the changes worked back into the original.

A “thanks” to Mark Breneman’s blog post that provided some of the code.

You can get the tag from http://cf_payflowpro.riaforge.org

Usage examples:

Simple CC charge:

<cf_PAYFLOWPRO QUERY   = "RESULT"
            HOSTADDRESS   	= "#cfg_pfp_host#"
            HOSTPORT       	= "443"
            TIMEOUT        	= "30"
            TRXTYPE        	= "S"
            TENDER         	= "C"
            PARTNER 		= "PayPal"
            VENDOR 		= ""
            USER    		= "your_username"
            PWD            	= "your_password"
            ACCT           	= "#cardnum#"
            EXPDATE        	= "#Form.ccexpmo##Form.ccexpyr#"
            AMT            	= "#amt#"
            COMMENT1       	= "#Form.email#"
            COMMENT2       	= "Purchased qty #Form.qty# of #Form.product#"
            EMAIL		= "#Form.email#"
            NAME		= "#Form.ccname#"
            STREET		= "#Form.ccaddress#"
            CITY		= "#Form.cccity#"
	    STATE		= "#Form.ccstate#"
	    ZIP			= "#Form.cczip#"
            >

Setup recurring billing profile:

	<cf_PAYFLOWPRO QUERY    = "RESULT"
                HOSTADDRESS   	= "#cfg_pfp_host#"
                HOSTPORT       	= "443"
                TIMEOUT        	= "30"
                TRXTYPE        	= "R"
                TENDER         	= "C"
                PARTNER 	= "PayPal"
            	VENDOR 		= ""
           	USER    	= "your_username"
            	PWD            	= "your_password"
                ACCT           	= "#Arguments.ccnum#"
                EXPDATE        	= "#Arguments.ccexpmo##Arguments.ccexpyr#"
                AMT            	= "#lcfg_services[Arguments.subtype].cost#"
                COMMENT1       	= ""
		ACTION		= "A"
		EMAIL		= "#qryuser.email#"
		NAME		= "#Arguments.name#"
		STREET		= "#Arguments.address#"
		CITY		= "#Arguments.city#"
		STATE		= "#Arguments.state#"
		ZIP		= "#Arguments.zip#"
		START		= "#startChargeDate#"
		PROFILENAME	= "#qryuser.email#"
		PAYPERIOD	= "MONT"
		OPTIONALTRX	= "#optionaltrx#"
		OPTIONALTRXAMT	= "#optionaltrxamt#"
		TERM		= "0"
		>

Update for CF5 users: For those of you on CF5, I’ve come up with a version that should work for you. This will work on Windows only, unfortunately. It uses a COM object to do the http call. You shouldn’t need to install anything, I think the COM object its using is part of Windows. You can download this version of the tag from here: PayPal payflowpro for CF5.

Update: Several people have asked me to put up a paypal donation button so they could give something to thank me for the time I’ve saved them. So here it is:









142 Comments

  1. Gregory Matthews says:

    … getting an error via CF8.

    "The column name Connection Failure is invalid."

    "Column names must be valid variable names. They must start with a letter and can only include letters, numbers, and underscores. "

    Any ideas?

    Thanks!

    Gregory

  2. Ryan Stille says:

    Gregory, do you have the line number thats throwing the error?

  3. Gregory Matthews says:

    … yes. I just had my host enable Robust Exception Information. Here's where it's coming from:

    ——————
    Column names must be valid variable names. They must start with a letter and can only include
    letters, numbers, and underscores.

    The error occurred in D:\ftp\gox\Htdocs\customtags\PayFlowPro.cfm: line 65

    63 :
    64 : <cfloop list="#cfhttp.FileContent#" index="i" delimiters="&">
    65 : <cfset QueryAddColumn(tmpResponse, listfirst(i,'=') , ListToArray(listlast(i,"=")))>
    66 : </cfloop>
    67 :
    ——————

    Thanks Ryan. Please let me know.

    Gregory

  4. Ryan Stille says:

    Gregory it looks like your cfhttp call is failing for some reason.  Make sure your host and port attributes are correct.  The port passed in should be 443 or it should be absent completely.  The host should be one of either:

    test-payflow.verisign.com
    payflow.verisign.com
    pilot-payflowpro.verisign.com
    payflowpro.verisign.com

    I think paypal.com will work instead of verisign.com also.

    You aren't passing in proxy related attributes, are you?  Those are not supported.  Other than that, I'm not sure.  You could try a very simple cfhttp request and see if it fails.  If that fails then its not related to the tag.  If it doesn't fail, then there is probably something wrong with one of the connection related attributes you are passing to the tag.  Try:

    <cfhttp method="POST" url="https://pilot-payflowpro.verisign.com/transaction"&gt;
        <cfhttpparam type="body" value="USER[4]=test&PWD[4]=test">
    </cfhttp>
    <cfdump var="#cfhttp#">

  5. Gregory Matthews says:

    Hi Ryan,

    Cool. I had https://pilot-payflow.verisign.com instead of https://pilot-payflowpro.verisign.com.

    One more quick question. In my previous script, I was using the below to display the results of the cf_payflopro tag, but now all I'm getting is a blank screen. I'm sure it has something to do with the way your new tag is passing back the responses (I hope).

    Can you take a quick look at the below and let me know what I need to update?

    Thanks again .

    Gregory

    <cfif result.result neq "0">
            <cfset card_test_results = '<font color="Red">Connection to Verisign Failed!!!</font><br><br> Check Username, Password, and Partner Code<br>
            Return Code: #result.result#<br>
            Message: <cfif isdefined("#result.respmsg#")>#result.respmsg#</cfif>'>
        <cfelse>
            <cfset card_test_results =
                'Connection to Verisign Successful<br><br>
                    <cfoutput>
                        Transaction Status: <b>#result.respmsg#</b><br>
                          Result Code: #result.result#<br>
                          PNREF: #result.pnref#<br>
                        AuthCode: #result.authcode#
                    </cfoutput>'
            >
        </cfif>

  6. Ryan Stille says:

    Hmm very weird if you are just getting a blank screen.  The CF_ tag *should* be returning data the exact same way the CFX_ tag was. Check the ColdFusion error log, and if there's nothing there to help you, you might just have to start pulling out code until you get something other than the blank screen.

  7. Gregory Matthews says:

    Ryan,

    Fixed it. One last question.  I'm not getting the following return code:

    Return Code: 26
    Message: Invalid vendor account

    I've never had to specify a vendor account before. Do you know what that is?

    Thanks.

    Gregory

  8. Ryan Stille says:

    PayPal says vendor should be the same as the user unless a Payflow Pro USER was created.

    There is code in the tag that should set the VENDOR to the same value as the USER, unless you specifically pass in a VENDOR value.

  9. Gregory Matthews says:

    … thanks again. Will this new tag continue to work after 2009, or do we need to update the verisign.com domain to paypal.com in the tag?

  10. Ryan Stille says:

    This should keep working forever, as far as I know.  All the examples I see from PayPal still use the verisign.com domain.

  11. Daniel Sorrentino says:

    Great Tag!!

    Is there an official statement from PayPal regarding the custom tag stop working in September?

  12. Ryan Stille says:

    Daniel, if you dig around on the PayPal developer forums you can find references to dropping support for the older SDK's (which CFX_PayFlowPro used).  But they also just posted this in the last few days, which clearly states it:
    http://www.pdncommunity.com/t5/blogs/blogarticlepage/blog-id/devblog/article-id/991

    It says:
    In September 2009, PayPal will begin upgrading its Payflow gateway service from a single-tier SSL server certificate hierarchy to a new, more secure two-tier hierarchy. All older Payflow integrations must be updated to support the new certificate type. PayPal has released a new Software Development Kit (SDK version 4.3+) for Microsoft .NET and Java; along with a HTTPS interface for all other programming languages. All Payflow Pro integrations will need to be upgraded to this new SDK or the HTTPS interface before September 2009.

  13. Austin M says:

    Line 65 gives "The column name Connection Failure is invalid." error – caused by response key of "Connection Failure" having space and trying to be set as column name.

    Changing line 65 from:
    <cfset QueryAddColumn(tmpResponse, listfirst(i,'=') , ListToArray(listlast(i,"=")))>
    To:
    <cfset QueryAddColumn(tmpResponse,
    Replace(listfirst(i,'='), ' ', '_', 'all') , ListToArray(listlast(i,"=")))>

    Should do it. :)

  14. Rick B says:

    This is what I found on PayPal's site regarding the proper hosts names to be used for all transactions:

    # New Live URL: payflowpro.paypal.com (replaces test-payflow.verisign.com)
    # New Test URL: pilot-payflowpro.paypal.com (replaces payflow.verisign.com)

  15. Calvin says:

    Is anyone using CFX_PAYMENTNET?  I have tried to simply replace the url with the new url and I am getting the following error:

    SSL_Read() packet size mismatch

    Any suggestions or ideas would be most helpful.

    Thanks,
    Calvin

  16. Brian says:

    I just ran through a test with this tag and looked in our paypal management account and it still says the client version is 4.00.  Should this be different going through your tag?

  17. Jessica says:

    I am trying to test the new tag, but I keep getting the following error:

    Diagnostics: Attribute set validation error in tag CFHTTPPARAM
    The tag has an invalid attribute combination: the following required attributes have not been provided: (NAME).

    The error occurred while processing an element with a general identifier of (CFHTTPPARAM), occupying document position (58:4) to (58:47).

    The specific sequence of files included or processed is:
    E:\WEB\AB1615079\NEWTEST.CFM      
      E:\WEB\AB1615079\PAYFLOWPRO.cfm      Custom Tag

    The error occurred while processing an element with a general identifier of (CF_PAYFLOWPRO), occupying document position (5:1) to (27:13).

  18. Ryan Stille says:

    @Brian – sorry, I have no idea.

    @Jessica – I haven't seen that before, it sounds like you might be on an older version of CF.

    Try changing this line
    <cfhttpparam type="body" value="#ParmList#">

    to be
    <cfhttpparam type="body" name="request" value="#ParmList#">

    but I'm just guessing right now.

  19. Jessica says:

    yes we are on an older version of CF. That change fixed that error, but now I'm getting the following:
    An error occurred while evaluating the expression:

    QueryAddRow(tmpResponse, 1)

    Error near line 62, column 7.
    ——————————————————————————–

    A query must have at least one column in order to add a row to it.

    The error occurred while processing an element with a general identifier of (CFSET), occupying document position (62:1) to (62:35).

  20. Shaikh says:

    HTTP interface's version is 4.0 and this is supported in the New Integration also.

    "using our HTTPS interface version number 4.00 or higher you do not need to change your integration"

    https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/gateway_update_FAQ

    >#  Brian Says:
    >March 31st, 2009 at 10:44 am

    >I just ran through a test with this tag and looked in our paypal management account and it still says >the client version is 4.00.  Should this be different going through your tag?

  21. Jessica says:

    yes we are on an older version of CF. That change fixed that error, but now I'm getting the following:
    An error occurred while evaluating the expression:

    QueryAddRow(tmpResponse, 1)

    Error near line 62, column 7.
    ——————————————————————————–

    A query must have at least one column in order to add a row to it.

    The error occurred while processing an element with a general identifier of (CFSET), occupying document position (62:1) to (62:35).

    Any ideas what I can do?

  22. Todd Sieber says:

    Can you update the cfm as below.  I removed a couple legacy items and change the host urls to paypal.com.

    [snip]
    (Todd – I’ve incorporated some of your changes, thanks. -Ryan)

  23. Jessica says:

    I finally got the tag to work, but now I'm getting RESULT=1&RESPMSG=User authentication failed  I have the correct Partner, User, PW and I've left Vendor blank.  I'm able to log into paypal manager w/o any issues.

  24. Michael says:

    Thanks so much, this saved a lot of time.

  25. David says:

    Thanks Ryan for the tag. A note to anyone who uses Paypal's ACH payment option to add in ABA and ACCTTYPE to the cfloop list for the attributes.

  26. Ryan Stille says:

    Thanks all.  I've added ABA and ACCTTYPE to the list of recognized fields, and changed the URLs to use the paypal.com domain.  Latest version is now 1.3.

    http://cf_payflowpro.riaforge.org/

  27. Calvin Click says:

    Good day all,
    I am trying to an "authorize" transaction and I am betting the following error : Field format error: ORIGID missing.  Looking through the documentation I could not find anything that said that the "authorize" transaction needed the ORIGID.

    Thanks,
    Calvin

  28. Stephanie says:

    Hi, I am about to update our CFX_PAYFLOWPRO to CF_PAYFLOWPRO.  I noticed that in the CFX tag there is a parameter CERTPATH.  I wonder what it is for and if it's required for CF_PAYFLOWPRO. Thanks.

  29. Ryan Stille says:

    Stephanie, CERTPATH is not required.   Actually the functionality related to CERTPATH is whats causing the need to move away from the old method – the certificate is expiring.

  30. B Jones says:

    thanks a lot for the tag Ryan. I'll be upgrading from CFX_payflowPro on CF7, and setting up recurring billing, so your site/code/tag is perfect.  I'll post any solutions to any snags I hit along the way.

    thanks again.

  31. viki says:

    I see in the blog it will stop working in sept. But i don't see what are the changes between this two custom tags. I mean CFX_PAYFLOWPRO and CF_PAYFLOWPRO.

    Why it will stop working in sept. What kind of changes paypal making.

    Also I use CF_PAYFLOWPRO I should be fine right?

    Thanks

  32. Ryan Stille says:

    Viki the two tags are completely different technologies, one is written in C++ or Java and compiled into a binary, the other is just ColdFusion.  The binary CFX tag uses a method of communicating with PayPal that will no longer be supported by PayPal.  They are basically turning it off.

    The CF tag communicates using the new, preferred method.  If you are using this tag you have nothing to worry about.

    Hope this helps.

  33. Mohamed says:

    I am getting connection failure.

    Resultset has 2 coulmns only CONNECTION_FAILURE, PARMLIST, RESULTSTR

    I am able to connect using CFX_PAYFLOWPRO and I get following list of columns
    AUTHCODE, IAVS, PARMLIST, PNREF, POSTFPSMSG, PREFPSMSG, RESPMSG, RESULT, RESULTSTR, VERSION

    Result column has value 0 if approved.

    Can get some help here.

    Thanks,

  34. Mohamed says:

    I am able to connect using
    pilot-payflowpro.verisign.com

    When I use pilot-payflowpro.paypal.com I am receiving connection failure.

  35. Eleni says:

    I had the same issue and paypal technical support told me that they updated root certificate on the pilot endpoint. Please use the following instructions to correct the issue:

    For Windows, do one of the following:

    Run Windows Update on the server making sure to install KB931125.
    Review the KB article at http://support.microsoft.com/?kbid=931125.
    Follow the instructions for "other OS" below.

    For all other operating systems, do the following two steps:

    Download the certificate from VeriSign at https://www.verisign.com/support/roots.html.
    Follow the Installation instructions at https://knowledge.verisign.com/support/ssl-certificates-support/index?page=content&id=AR212&actp=LIST.

  36. Calvin Click says:

    Good day all,

    I keep getting emails from paypal that we are still using the soon to be outdated API.  Currenty we are using the latest drop in cf_PAYFLOWPRO with out any issues.  Does anyone have any idea why we are still being told we are using the old API.

    Thanks,
    Calvin CLick

  37. Nate says:

    I get the same problem. pilot-payflowpro.paypal.com gives the error, "I/O Exception: peer not authenticated". Changing to pilot-payflowpro.verisign.com works perfectly.

  38. Nate says:

    @Jessica – Did you ever figure out the user authentication problem? We're using CF5 in production and I'm getting the same error as you. In development we're using CFMX7 as I can't get CF5 to install on Vista.

  39. Rosa says:

    Nate -  did you figure out why you can connect to pilot-payflowpro.verisign.com and not pilot-payflowpro.paypal.com? I have the same issue. Please let me know if you found a solution. It would be greatly appreciated!

  40. Adam says:

    @Jessica – Did you ever figure out the user authentication problem?  I can not get passed this error….

  41. Srinivas says:

    @Jessica – How did you fix the issue? Can you please let us know as we are having same issue.

  42. Andrew says:

    I'm also getting the "I/O Exception: peer not authenticated". But it works with pilot-payflowpro.verisign.com and not pilot-payflowpro.paypal.com

    Can anyone who gets it to work please come back and share with the rest of us? Thanks!

  43. Andrew says:

    I've got three different sites and each has it's own issues:

    1. On my first site running on CF8 this fix works perfectly.
    2. On my second site running on CF7 I get the same "I/O Exception: peer not authenticated" error like most people.
    3. On my third site running on CF5 this tag doesn't even work!

    If I could just figure out what's causing the "I/O Exception: peer not authenticated" then I can move on to figuring out how to improve the tag for CF5.

    It would be great if anyone who figures any of this out comes back and share their solutions with the rest of us.

    Thanks!

  44. Chris says:

    For those of you still having issues with Coldfusion 5 I found some forum posts on Paypal that might be helpful.

    http://tinyurl.com/ljlj5g
    http://tinyurl.com/lcbtry

    Basically CF5 doesn't like the "header" cfhttpparam type, and it also doesn't like throwing all the payment info in one big variable like:
    <cfhttpparam type="body" name="Request" value="#ParmList#">.

    So I switched out all my "header" types to "CGI' and listed out the params seperatly like: <cfhttpparam name="TRXTYPE" type="formfield" value="S" encoded="no">, then it worked fine for me.

    Hope this helped, and good luck on getting yours to work.

  45. Rohan says:

    Hi, I'm afraid I have very little experience with CF (we are using CF8) and I have been tasked with fixing the CFX_PayFlowPro issue before it expires. Would it be possible for you to provide a step by step guide to implementing your solution, aimed at the CF novice.
    I have spent a while researching this already and found the following.
    The existing CFX_PayFlowPro is java based and defined in the CFX tags of the administrator console?
    This solution uses a CFM file that can just be placed in the same directory?
    I have read others comments stating that this is by far the easiest method, and only takes a few minutes.
    Would it be possible for you to provide a step by step guide to implementing your solution, aimed at the CF novice, with particular attention to the Custom tags and how this is different to the existing method.
    Thanks in advance
    Rohan

  46. Glen says:

    Thanks Chris for the info and the success story.  Would you mind posting your full CF5 friendly code (showing the logic on how you tested for and set all the cfhttparams)? ;-)   Also, just to confirm, you did get CF_PayFlowPro to work 100% by changing out the parameters?  Thanks!

  47. Chuck says:

    Ok, we have Coldfusion 5 enterprise and use a shopping cart from Oleani, I think they are history, since I have had no call or email back from support on this issue. http://www.oleani.com/index.cfm

    We currently use the CFX_PayFlowPro tag and have rec'd the emails from paypal with the threats.. so are you stating that I can just replace the current tag with the one above and it should work? any feedback to a person who knows little about this would be great!

  48. Ryan says:

    Chuck that is the idea – that you can place this tag into your CustomTags folder, then change your code to be CF_payFlowPro instead of CFX_PayFlowPro.  For many people thats all they had to do. Unfortunately it seems like there are some issues with this custom tag + CF5, and no one has been very forthcoming about what they had to do to get it working on CF5.  I haven't had to touch a CF5 server in years (thank goodness :-) ) so I can't be of much help.

  49. Chris says:

    @Glen

    Here is my working CF5 cfhttp call:

    <cfhttp method="POST" url="https://#Attributes.hostaddress#/transaction&quot; resolveurl="no" timeout="#Attributes.TIMEOUT#" port="#Attributes.HOSTPORT#">
       <cfhttpparam type="CGI" name="Content-Type" VALUE="text/namevalue">
       <cfhttpparam type="CGI" name="Content-Length" VALUE="#Len(ParmList)#">
       <cfhttpparam type="CGI" name="Host" value="#Attributes.hostaddress#">
       <cfhttpparam type="CGI" name="X-VPS-REQUEST-ID" VALUE="#Attributes.requestID#">
       <cfhttpparam type="CGI" name="X-VPS-CLIENT-TIMEOUT" VALUE="#Attributes.TIMEOUT#">
       <cfhttpparam type="CGI" name="X-VPS-VITCLIENTCERTIFICATION-ID" VALUE="#Attributes.PARTNER##Attributes.USER#">
       <cfhttpparam name="HOSTADDRESS" type="formfield" value="dolanmedia" encoded="no">
       <cfhttpparam name="HOSTPORT" type="formfield" value="" encoded="no">
       <cfhttpparam name="TIMEOUT" type="formfield" value="" encoded="no">
       <cfhttpparam name="TRXTYPE" type="formfield" value="" encoded="no">
       <cfhttpparam name="TENDER" type="formfield" value="" encoded="no">
       <cfhttpparam name="PARTNER" type="formfield" value="" encoded="no">
       <cfhttpparam name="USER" type="formfield" value="" encoded="no">
       <cfhttpparam name="VENDOR" type="formfield" value="" encoded="no">
       <cfhttpparam name="PWD" type="formfield" value="" encoded="no">
       <cfhttpparam name="ACCT" type="formfield" value="" encoded="no">
       <cfhttpparam name="EXPDATE" type="formfield" value="" encoded="no">
       <cfhttpparam name="AMT" type="formfield" value="" encoded="no">
       <cfhttpparam name="NAME" type="formfield" value="" encoded="no">
       <cfhttpparam name="COMMENT1" type="formfield" value="" encoded="no">
       <cfhttpparam name="COMMENT2" type="formfield" value="" encoded="no">
    </cfhttp>

  50. Chuck says:

    So Chris, how do I use that on my website?

  51. Ryan says:

    Chuck, why don't you just copy the custom tag to your server, then try changing your code from "CFX_PayFlowPro" to "CF_PayFlowPro".  That *might* be all you need to do.  If issues arise you can tackle them one by one.

  52. Chuck says:

    I will try that early next week, I am not the owner of this piece and have NO clue other than copying the file, changing the CF admin info, etc.. Thanks

  53. Dinesh says:

    Hi All,
    My client checked in paypal account & noticed that transactions are presently coming through version 3.x
    This tag was very helpful. We ran it successfuly in development environment.
    But before putting it into production, we wanted to make sure that will it
    show version 4.0 or above in paypal manager?

  54. Glen says:

    @Chris

    Thanks for the reply, but I'm still not getting it to work on CF5.  I know it's my dev error.  Chris, please drop me a note at:  NeedPFPHelp @ gmail.com.  At this point, I'd gladly pay you (or anyone) for the full working code for the custom tag implemented on CF5.  I'll likely have a few questions for you during the initial configuration… but I'm out of time to troubleshoot the implementation of the basic tag.  Thanks!

  55. CC says:

    Does anyone have a complete CM5 solution that they can post? I've tried all of the above suggestions and just can't get it working. Any help is appreciated, desperate!

  56. Chuck says:

    I checked my server, our current CFX_PayFlowPro is java-based, does that matter? or can we just a the CF_PayFlowPro and run it?

  57. Ryan says:

    Chuck: yes the old CFX tag is java based.  Its using a connection method no longer supported by PayPal.   This custom tag (written only in CFML) uses the new connection method and does not require any Java libraries.

  58. Chuck says:

    Thanks for the fast return Ryan, so I should just remove the CFXPayFlowPro java in the Registered CFX Tags and replace it with the one above?

  59. Ryan says:

    Chuck you don't need to do anything with the CFX tag or the registration of the tag (after everything is working on the new tag you could delete it if you want).  You need to place the PayFlowPro.cfm file into your CustomTags directory.  Then change your code where you are using CFX_PayFlowPro to instead of CF_PayFlowPro.

  60. Mike Roberto says:

    One important note that I discovered – if you use custom comments be aware that including commas in the comment values could cause unintended results if you're also looping around the RESULT result set.  In my case commas were creating multiple result records so processing an authorization and then a capture ended up processing multiple captures because I was using a loop around the result recordset.  This creates a return of Result Code 111 which is duplicate captures on a single authorization.

    So just be aware that if you have comments with commas, you may want to change or replace commas to another character or not include them at all.  Also if you're allowing user entered content into the comments(or any other value) be sure to sanitize the entries and replace out commas or else could will also cause you problems.

  61. Dinesh says:

    Hi Ryan,
    Thanks. This tag helped a lot considering API from paypal was little confusing.
    We ran the code successfully. I have one question:
    We made a transaction using this code. Transaction was successfull. But how we could be sure that this transaction is in accordance with new paypal integration
    Does the transaction version on paypal manager will show up 4 or above?

  62. Chuck says:

    Last question.. ;)

    Do I have to rename the custom tag in the zip from PayFlowPro.cfm to CF_PayFlowPro.cfm or will it do that automaticcaly? I changed it in the checkout.CFM page already..

  63. Ryan says:

    Chuck you don't have to rename the file.  Calling it from within your code with CF_ at the beginning tells ColdFusion to look in the CustomTags directory for a file with that name WITHOUT the CF_ on it.

  64. Rohan says:

    Hi,

    I am trying to implement this solution and I am getting an error with this line from my existing code.

    <cfif #result.result# IS "0">

    Element RESULT is undefined in RESULT.

    Can anybody point me to the problem?

    I have included a code snippet below.

    Thanks

    Rohan
    [code snipped]

  65. Ryan says:

    Rohan, the "result" key gets created by what is returned from PayPal.  You are not evidently getting a proper result from PayPal.  Edit the tag and dump what is being returned and track it down from there.

  66. Rohan says:

    Thanks Ryan, but I really don't know how to do that.
    I am a programmer, but know nothing about Dreamweaver/coldfusion or HTML either.
    Is it possible for you to give me the couple of lines so I can see what is happenning?
    Thanks
    Rohan

  67. Rohan says:

    I finally got it working, phew!

    Thanks for your help.

  68. Toddzilla says:

    @CF 5 People

    We used Ryan's tag on new servers, but for old CF5 servers, we replaced the <CFHTTP> tag with the following

    <cfobject type="COM"
        action="Create"
        name="objServerXMLHttp"
        class="msxml2.ServerXMLHTTP.3.0">
      
    <cfset objServerXMLHttp.open("POST", "https://#attributes.hostaddress#/transaction&quot;, false)>
    <cfset objServerXMLHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")>
    <cfset objServerXMLHttp.setRequestHeader("X-VPS-REQUEST-ID", "#attributes.requestID#")>
    <cfset objServerXMLHttp.setRequestHeader("X-VPS-VIT-CLIENT-CERTIFICATION-ID", "#attributes.PARTNER##attributes.user#")>
    <cfset objServerXMLHttp.setRequestHeader("X-VPS-CLIENT-TIMEOUT", "#attributes.timeout#")>
    <cfset objServerXMLHttp.send("#request.parmList#")>

    <cfset responseText = objServerXMLHttp.responseText>

    This works like a charm.  The "responseText" variable will have the same file content in it as the result of the <cfhttp> tag in Ryan's tag.  Many thanks to Ryan for the original tag!

  69. Chuck says:

    We got this error, does this refer to the above post for it to be corrected on a CF5 box?

    Error Diagnostic Information

    Attribute set validation error in tag CFHTTPPARAM

    The tag has an invalid attribute combination: the following required attributes have not been provided: (NAME).

    The error occurred while processing an element with a general identifier of (CFHTTPPARAM), occupying document position (58:4) to (58:47).

    The specific sequence of files included or processed is:
    C:\WEBSITE\PURCHASECOMPLETE.CFM    
      C:\CFusion\CustomTags\PayFlowPro.cfm      Custom Tag

    The error occurred while processing an element with a general identifier of (CF_PAYFLOWPRO), occupying document position (130:3) to (152:58).

    Date/Time: 08/13/09 16:06:02

  70. Toddzilla says:

    @Chuck

    Probably.  That looks like the error you get on CF5.  The problem is that <cfhttpparam> tags of type "body" were not present in CF5.  There are two solutions posted above.  The first solution uses <cfhttpparam> tags of type "formfield" to get around the limitation.  The other solution that I posted uses the Microsoft XML parser COM object built into IIS to do an XML post.

  71. Robin says:

    I am hoping Rohan is still looking at this but probably isn't as he got it to work. I am having exactly the same issue "Element RESULT is undefined in RESULT.".

    As someone mentioned this is a failure in communication somehow as there is nothing in the test transaction list either.

    I'm using pilot-payflowpro.paypal.com to connect from a https connection.

    THis is what I have – minus the login stuff:
    <cf_PAYFLOWPRO QUERY   = "RESULT"
                HOSTADDRESS       = "pilot-payflowpro.paypal.com"
                HOSTPORT           = "443"
                TIMEOUT            = "30"
                TRXTYPE            = "A"
                TENDER             = "C"
                PARTNER         = "paypal"
                VENDOR             = "removed"
                USER            = "removed"
                PWD                = "removed"
                ACCT               = "#Form.x_Card_Num#"
                EXPDATE            = "#Form.x_Exp_Date_mo#_#Form.x_Exp_Date_yr#"
                AMT                = "#DollarFormat(Form.amount)#"
                COMMENT1           = "#Form.FName#_#Form.LName#"
                COMMENT2           = ""
                EMAIL        = "#Form.email#"
                NAME        = "#Form.FName#_#Form.LName#"
                STREET        = "#Form.address1#"
                CITY        = "#Form.city#"
            STATE        = "#Form.state#"
            ZIP            = "#Form.zip#"
                >

  72. Robin says:

    Just thought that I would note that this advice:

    "I get the same problem. pilot-payflowpro.paypal.com gives the error, "I/O Exception: peer not authenticated". Changing to pilot-payflowpro.verisign.com works perfectly." helped me with my Element RESULT is undefined in RESULT problem.

    Works just fine now!

  73. Chuck says:

    I'm sure I'm close, but now with Toddzilla's code we get this error:

    Error Diagnostic Information

    An error occurred while evaluating the expression:

    objServerXMLHttp.send("#request.parmList#")

    Error near line 61, column 7.

    Error resolving parameter REQUEST.PARMLIST

    The object PARMLIST is not present in the scope named REQUEST. It is likely that you have misspelled the name of the object you are trying to access.

    The error occurred while processing an element with a general identifier of (CFSET), occupying document position (61:1) to (61:51).

    Date/Time: 08/14/09 09:48:36
    Browser: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
    Remote Address: 192.168.1.45
    HTTP Referrer: https://domainname.com/secure/purchasepreview.cfm

    Did I have to restart the CF server in order for this new code to work?

  74. Ryan says:

    Guys, I have a copy of this tag that is working fine in CF5.  I will try to get it posted later tonight.

  75. Steve Ferda says:

    Hey all,

    First up: Love the tag.  Great stuff.

    CFX_PayFlowPro (at least the version we have) supported a parameter called "CVV2", which was the CC security code from the back of the card.  Does such a parameter exist in CF_PayFlowPro?  If so, has it been renamed?

    Thanks for the help… client getting antsy (with their procrastinating developer).

  76. Steve Ferda says:

    Following up… it was an easy fix…

    <cfloop list="TRXTYPE,TENDER,PARTNER,VENDOR,USER,PWD,ACCT,EXPDATE,AMT,COMMENT1,COMMENT2,ACTION,EMAIL,NAME,STREET,CITY,STATE,ZIP,START,PROFILENAME,PAYPERIOD,OPTIONALTRX,OPTIONALTRXAMT,IP,PHONENUM,TERM,ORIGPROFILEID,ORIGID,ABA,ACCTTYPE,CVV2" index="field">

    Note the last attribute.  For our implementation, this turned on CCID validation.  

    Again… thanks.

  77. Georges Lorentz says:

    Hello
    I need your help.
    I have upgraded my code using your CF_PAYFLOWPRO tag and getting this error;

    Cannot find CFML template for custom tag PAYFLOWPRO.  
    ColdFusion attempted looking in the tree of installed custom tags but did not find a custom tag with this name.  
      

    Could you please help.

    Thanks

  78. Jammie says:

    Ryan
    have you had a chance to post the tag that works with CF5??  Thanks

  79. Ryan says:

    Jamie I will try to get it posted tonight.

  80. Jammie says:

    Thanks!! I appreciate it!

  81. Georges Lorentz says:

    Jammie.
    Thanks for your really quick response.
    I need this working tag badly, as we are running out of time. Paypal on several of my sites will no longer work.

    Thanks for your help.

    Georges

  82. Georges Lorentz says:

    Jamie, Ryan.
    Could you please help us, as we are running out of time. By 9/1/2009, Paypal will stop supporting <CFX_PAYMENTNET and I need to upgrade several sites.
    I tried CFX_PayFlowpro but getting an error

    Error processing CFX custom tag "CFX_PAYFLOWPRO".  
    The CFX custom tag "CFX_PAYFLOWPRO" was not found in the custom tag database. Please be sure to add custom tags to the database before using them. If you have added your tag to the database then you should check the spelling of the tag within your template to insure that it matches the database entry.  
      
    I am not familiar with how to provide this custom tag.

    Please help us by providing a working solution with you CF_Payflowpro.

    It will be greatly appreciated !

    Thanks in advance.

  83. Georges Lorentz says:

    Jamie, Ryan.

    I am submitting with my alternate email. Maybe the firewall has prevented me getting your response.

    Thanks in advance.

  84. Ryan says:

    Guys I've updated this post with a link to a version of the tag that will work on CF5.  Its Windows-only as it uses a COM object to do the http call.

  85. Craig says:

    I've provided a link to my complete solution for CF5 using Ryan's tag for anyone who might want to see it. I upgraded my systems from CFX_PaymentNet to CF_PayFlowPro (https). Works great. Thanks Ryan, you saved my ars!

    http://www.mediafire.com/?sharekey=594676ec9625ff0f07258ee67c679e4a95ca03e7d071bfb8c95965eaa7bc68bc

  86. Todd says:

    I'm getting an "Invalid Amount" error (result code: 4). I've determined that the problem is with amounts that have a decimal place. I can pass 100 just fine, but get an error when I try to pass 100.05. Is there something special I need to do to fix this?

  87. Todd says:

    Follow up to my last post, here is the rspmsg I get:

    RESPMSG=Invalid amount: Range must be $0.01 thru $25000.00

    It seems like it is passing a zero dollar amount, even though I can kick out the attributes I'm passing and it shows 100.05?

  88. Ryan says:

    Todd can you give us some more details about your setup?  What version of ColdFusion, which OS, which version of the tag are you using, etc.

  89. Todd says:

    I'm on CF5, Windows Server 2000. As far as the tag, I'm using the code below:

    <cfhttp method="POST" url="https://#Attributes.hostaddress#/transaction&quot; resolveurl="no" timeout="#Attributes.TIMEOUT#" port="#Attributes.HOSTPORT#">
       <cfhttpparam type="CGI" name="Content-Type" VALUE="text/namevalue">
       <cfhttpparam type="CGI" name="Content-Length" VALUE="#Len(ParmList)#">
       <cfhttpparam type="CGI" name="Host" value="#Attributes.hostaddress#">
       <cfhttpparam type="CGI" name="X-VPS-REQUEST-ID" VALUE="#Attributes.requestID#">
       <cfhttpparam type="CGI" name="X-VPS-CLIENT-TIMEOUT" VALUE="#Attributes.TIMEOUT#">
       <cfhttpparam type="CGI" name="X-VPS-VITCLIENTCERTIFICATION-ID" VALUE="#Attributes.PARTNER##Attributes.USER#">
       <cfhttpparam name="HOSTADDRESS" type="formfield" encoded="no" value="#Attributes.hostaddress#">
       <cfhttpparam name="HOSTPORT" type="formfield" encoded="no" value="#Attributes.hostport#">
       <cfhttpparam name="TIMEOUT" type="formfield" encoded="no" value="#Attributes.timeout#">
       <cfhttpparam name="TRXTYPE" type="formfield" encoded="no" value="#Attributes.trxtype#">
       <cfhttpparam name="TENDER" type="formfield" encoded="no" value="#Attributes.tender#">
       <cfhttpparam name="PARTNER" type="formfield" encoded="no" value="#Attributes.partner#">
       <cfhttpparam name="VENDOR" type="formfield" encoded="no" value="#Attributes.vendor#">
       <cfhttpparam name="USER" type="formfield" encoded="no" value="#Attributes.user#">
       <cfhttpparam name="PWD" type="formfield" encoded="no" value="#Attributes.pwd#">
       <cfhttpparam name="ACCT" type="formfield" encoded="no" value="#Attributes.acct#">
       <cfhttpparam name="EXPDATE" type="formfield" encoded="no" value="#Attributes.expdate#">
       <cfhttpparam name="AMT" type="formfield" encoded="no" value="#Attributes.amt#">
       <cfhttpparam name="NAME" type="formfield" encoded="no" value="#Attributes.name#">
       <cfhttpparam name="ZIP" type="formfield" encoded="no" value="#Attributes.zip#">
       <cfhttpparam name="COMMENT1" type="formfield" encoded="no" value="#Attributes.COMMENT1#">
    </cfhttp>

  90. Ryan says:

    Todd, for CF5/Windows try using the version of the tag specifically made for Windows/CF5. Its at the bottom of the article.

  91. stevadro says:

    Hi all,

    I've implemented the new cf_payflowpro but after connected with paypal return this error:

    Can you help me?

    PARMLIST:
    TRXTYPE[1]=S&TENDER[1]=P&PARTNER[8]=VeriSign&VENDOR[9]=MY_VENDOR&USER[7]=service&PWD[22]=MY_SERVICE_ID[4]=8.95&ACTION[1]=S&TERM[1]=0

    RESPMSG:
    Field format error: Invalid Return URL

    RESULT:
    7

    RESULTSTR:
    RESULT=7&RESPMSG=Field format error: Invalid Return URL

  92. stevadro says:

    Hi all,

    I've implemented the new cf_payflowpro but after connected with paypal return this error. I'm using Coldfusion 8 on Windows 2003.

    Can you help me?

    ***********************************************
    RESULT:

    PARMLIST:
    TRXTYPE[1]=S&TENDER[1]=P&PARTNER[8]=VeriSign&VENDOR[9]=MY_VENDOR&USER[7]=service&PWD[22]=MY_SERVICE_ID[4]=8.95&ACTION[1]=S&TERM[1]=0

    RESPMSG:
    Field format error: Invalid Return URL

    RESULT:
    7

    RESULTSTR:
    RESULT=7&RESPMSG=Field format error: Invalid Return URL

    *****************************************

    Call to action:

    <CF_PAYFLOWPRO
        QUERY = "RESULT"
        HOSTPORT = "443"
        TIMEOUT = "30"
        TENDER = "P"
        TRXTYPE = "S"
        ACTION = "S"
        PROXYADDRESS = ""
        PROXYPORT = ""
        PROXYLOGON = ""
        PROXYPASSWORD = ""
        HDRIMG = "#PayFlowAPIHeaderImage#"
        LOCALECODE = "US"
        HOSTADDRESS = "pilot-payflowpro.paypal.com"
        PARTNER = "VeriSign"
        VENDOR = "MY_VENDOR"
        USER = "MY_USER"  
        PWD = "MY_PASSWORD"
        CERTPATH = "C:\ColdFusion8\certs"
        AMT = "8.95"
        RETURNURL = "https://secure.cafebritt.com/users/BillToAddress.cfm?LangID=1&StartPayPalDemo=yes&&quot;
        CANCELURL = "http://www.cafebritt.com/index.cfm?LangID=#session.languageid#&view=154&item=basket&quot;
        Debug="1">

  93. stevadro says:

    Hi all,

    I've implemented the new cf_payflowpro but after connected with paypal return this error. I'm usign coldfusion 8 on windows 2003.

    Can you help me?

    PARMLIST:
    TRXTYPE[1]=S&TENDER[1]=P&PARTNER[8]=VeriSign&VENDOR[9]=MY_VENDOR&USER[7]=service&PWD[22]=MY_SERVICE_ID[4]=8.95&ACTION[1]=S&TERM[1]=0

    RESPMSG:
    Field format error: Invalid Return URL

    RESULT:
    7

    RESULTSTR:
    RESULT=7&RESPMSG=Field format error: Invalid Return URL

    *******************************************

    <CF_PAYFLOWPRO
        QUERY = "RESULT"
        HOSTPORT = "443"
        TIMEOUT = "30"
        TENDER = "P"
        TRXTYPE = "S"
        ACTION = "S"
        PROXYADDRESS = ""
        PROXYPORT = ""
        PROXYLOGON = ""
        PROXYPASSWORD = ""
        HDRIMG = "#PayFlowAPIHeaderImage#"
        LOCALECODE = "US"
        HOSTADDRESS = "pilot-payflowpro.paypal.com"
        PARTNER = "VeriSign"
        VENDOR = "MY_VENDOR"
        USER = "MY_USER"  
        PWD = "MY_PASSWORD"
        CERTPATH = "C:\ColdFusion8\certs"
        AMT = "8.95"
        RETURNURL = "https://secure.cafebritt.com/users/BillToAddress.cfm?LangID=1&StartPayPalDemo=yes&&quot;
        CANCELURL = "http://www.cafebritt.com/index.cfm?LangID=#session.languageid#&view=154&item=basket&quot;
        Debug="1">

  94. Ryan says:

    Steve I'm pretty sure the problem is with the ampersands in some of your values (the URLs).  They are either getting encoded and shouldn't be, or they need to be encoded and aren't.

    BTW there was no need to post twice, your first message showed up just fine.  I deleted the duplicate.

  95. stevadro says:

    Thanks Ryan, I correct the URL and run greats!!!

    In de PayFlowPro.cfm I change this source code commenting ParmList and change for:

    <cfset ParmList = "">
    <cfloop  list="TRXTYPE,TENDER,PARTNER,VENDOR,USER,PWD,ACCT,EXPDATE,AMT,CVV2,COMMENT1,COMMENT2,ACTION,EMAIL,NAME,STREET,CITY,STATE,ZIP,START,PROFILENAME,PAYPERIOD,OPTIONALTRX,OPTIONALTRXAMT,IP,PHONENUM,TERM,ORIGPROFILEID,ORIGID,ABA,ACCTTYPE,CERTPATH,RETURNURL,CANCELURL" index="field">

    <cfif StructKeyExists(Attributes,field) AND Len(Attributes[field])>
      <cfif Len(ParmList)>
        <cfset ParmList = ParmList & "&">
      </cfif>

      <!—<cfset ParmList = ParmList & "#field [#len(attributes[field])#]=#Attributes[field]#">—>

      <cfset ParmList = ParmList & "#field#=#Attributes[field]#">

      </cfif>
    </cfloop>

  96. Robin says:

    Has anyone else gotten this message after trying this CVV2 code from above?

    <cfloop list="TRXTYPE,TENDER,PARTNER,VENDOR,USER,PWD,ACCT,EXPDATE,AMT,CVV2,COMMENT1,COMMENT2,ACTION,EMAIL,NAME,STREET,CITY,STATE,ZIP,START,PROFILENAME,PAYPERIOD,OPTIONALTRX,OPTIONALTRXAMT,IP,PHONENUM,TERM,ORIGPROFILEID,ORIGID,ABA,ACCTTYPE,CVV2" index="field">

    Message I receive is:

    "Invalid token '"' found on line 84 at column 25. "

  97. Dinesh says:

    Hi All,
    We have used the code successfully on coldfusion 8, win2003 server. With CFX tag transaction version used to be 3. We made a transaction on live paypal url with this new code and this is how this turned out on paypal manager:
    Is there any way to find out transaction version out of this? I am not sure how our client found out version 3 with earlier transaction. But after reading comments from this post I assured them that transaction version would be 4 or above. We can not go live untill we clear this doubt even though we have tested it there too.
    Aug 11, 2009 5:32:37 PM
    Sale
    MasterCard
    5466XXXXXXXXXXXX
    02/10
    USD
    1.00
    0
    Approved
    Derek Moore
    TS

  98. Mike Murdy says:

    I am using CF MX 7 on Win 2003 server.

    Attempting to implement CF_PayflowPro as replacement for CFX_PAYFLOWPRO and having the following problem:

    The tag works fine as long as I connect to the verisign domain (both pilot-payflowpro.verisign.com and payflowpro.verisign.com) but I continue to get a connection failure when attempting to connect to the paypal.com domain (confirmed by using CF_DUMP).

    I updated the root certificates on my server, as outlined in KB931125, thinking this might be the issue, but no joy…

    I confirmed with PayPal support that the verisign domains were going to be deprecated as of 9/1/09, so I am now one week away from catastophic failure.

    Any help would be greatly appreciated!

  99. Chuck says:

    Ryan, Tried your CF5 fix and rec'd the following:

    Error Diagnostic Information

    An error occurred while evaluating the expression:

    Len(Attributes.parmlist)

    Error near line 24, column 6.

    Error resolving parameter ATTRIBUTES.PARMLIST

    The object PARMLIST is not present in the scope named ATTRIBUTES. It is likely that you have misspelled the name of the object you are trying to access.

    The error occurred while processing an element with a general identifier of (CFIF), occupying document position (24:1) to (24:31).

    Date/Time: 08/24/09 09:59:14
    Browser: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
    Remote Address: 192.168.1.45
    HTTP Referrer: https://www.store.com/secure/purchasepreview.cfm

  100. Adam Bertram says:

    I keep getting Connection Failure whenever I try the new files.  Any word on this issue?

  101. Glen says:

    Good news!  

    For those of you wondering if Ryan's CF5 solution resolves to the new Client Version number in PayPal Manager… it does!

    Our transactions are now showing
    Client Type:  Z    
    Client Version:  4.0.0.1

    Per the PayPal Migration Tech I just spoke too, this is golden.  The SDK and .NET solutions should show Client Version 4.3 or greater, but the above client type and version are expected for the HTTP solution.

    Ryan's the man…

  102. Ryan says:

    Chuck, thanks for pointing out that issue.  I've moved the line that defaults attributes.parmlist, it should work now.

    For those that are experiencing the connection failure – Have you restarted ColdFusion lately?  CF caches (actually its the JVM) hostname lookups, so if PayPal has changed IPs at all recently, you may be connecting to the wrong IP.  Restart CF and see if that helps.  Also – have you imported any certificates for the paypal.com domain into your keystore?  If so that may be part of the problem.  You shouldn't need to import any certificates for this to work.

  103. stevadro says:

    Need another help:

    I can connect to paypal but when paypal return my contact data I get this error. I'm usign CF8 on Win2003.

    ————————–
    ACTION = G

    TRXTYPE=S&TENDER=P&PARTNER=VeriSign&VENDOR=MY_VENDOR&USER=MY_USER&PWD=MY_PWDqynQ&ACTION=G&TERM=0&CERTPATH=C:\ColdFusion8\certs

    ————————–

    THE RETURNED ERROR:

    Field format error: Invalid Token 7 RESULT=7&RESPMSG=Field format error: Invalid Token

    help me help me ;)

  104. Chuck says:

    Ryan,

    I used the new code for CF5 and it ran fine, but when I went into the paypal manager the Client Version still shows :4.0.0.1 , do I need to restart the CF server or remove the old sdk?? not sure what to do?

  105. Ryan says:

    Chuck the 4.0.0.1 version number would be the correct one.  Dig around on the PayPal developer forums for more details.  They say the https interface will show up as 4.0 or 4.0.0.1.

  106. Chuck says:

    Ryan,

    Just to let everyone else know, Paypals forums state this:

    Anything with Client Type = Z (which would have client version 4.0.0.0 or 4.0.0.1) means you are using the HTTPS Interface and you are good to go.

    I thank everyone here for their help and Ryan, I would suggest placing a PayPal donate button here so we can give back to the person who made this work.

  107. stevadro says:

    Morning,

    Aside the cf_payflowpro code update, I need to update anything in the paypal management console?

  108. Kassim says:

    Ryan,
    I am getting connection failure error when I use https://pilot-payflowpro.paypal.com/transaction

        <cfhttpparam type="body" value="USER[4]=test&PWD[4]=test">
    </cfhttp>
    <cfdump var="#cfhttp#">

    OUTPUT
    struct
    Charset     [empty string]
    ErrorDetail     I/O Exception: peer not authenticated
    Filecontent     Connection Failure
    Header     [undefined struct element]
    Mimetype     Unable to determine MIME type of file.
    Responseheader     
    struct [empty]
    Statuscode     Connection Failure. Status code unavailable.
    Text     YES

    When I use https://pilot-payflowpro.verisign.com/transaction it is working fine. From one of the comments it looks like this url will be deprecated as of 09/01/09.

        <cfhttpparam type="body" value="USER[4]=test&PWD[4]=test">
    </cfhttp>
    <cfdump var="#cfhttp#">

    Charset     [empty string]
    ErrorDetail     [empty string]
    Filecontent     RESULT=1&RESPMSG=User authentication failed
    Header     HTTP/1.1 200 OK Content-type: text/namevalue Connection: close Date: Tue, 25 Aug 2009 15:16:39 GMT Content-length: 43 Server: VPS-3.033.00
    Mimetype     text/namevalue
    Responseheader     
    verisign – struct
    Connection     close
    Content-length     43
    Content-type     text/namevalue
    Date     Tue, 25 Aug 2009 15:16:39 GMT
    Explanation     OK
    Http_Version     HTTP/1.1
    Server     VPS-3.033.00
    Status_Code     200
    Statuscode     200 OK
    Text     YES

    Please provide me details how to fix it.

  109. EstebanD says:

    Hi Ryan, thank you for taking the time to share this code.

    Reading the latest documentation on PayFlow Pro I noticed that double quotes are forbidden from parameter values. So I did little changes in the block of code that creates the parameters list, so now it complies with the previous constraint and other minor improvements to improve the overall stability and readability of the code.

    <cfset ParmList = "">
    <cfloop list="TRXTYPE,TENDER,PARTNER,VENDOR,USER,PWD,ACCT,EXPDATE,AMT,COMMENT1,COMMENT2,ACTION,EMAIL,NAME,STREET,CITY,STATE,ZIP,START,PROFILENAME,PAYPERIOD,OPTIONALTRX,OPTIONALTRXAMT,IP,PHONENUM,TERM,ORIGPROFILEID,ORIGID,ABA,ACCTTYPE" index="field">
        <cfif StructKeyExists(Attributes,field) AND Len(Trim(Attributes[field]))>
            <cfset attributeField = Replace(Trim(Attributes[field]),Chr(34),"","all")>
            <cfif Len(attributeField) GT 0>
                <cfset ParmList = ListAppend(ParmList,"#field#[#Len(attributeField)#]=#attributeField#","&")>
            </cfif>
        </cfif>
    </cfloop>

  110. Dale Sutcliffe says:

    Found a problem with the program — fails on pilot-payflowpro.paypal.com works on payflowpro.paypal.com

  111. Dale Sutcliffe says:

    Returns      CONNECTION_FAILURE

  112. Mike Murdy says:

    Dale –

    We have come to the same conclusion. Follow this thread on the PayPal Dev forum:

    http://developer.paypal-portal.com/pdn/board/message?board.id=payflow&message.id=9031#M9031

    Cheers!

    Mike

  113. Steve says:

    CF8: I can connect to paypal but when paypal return my billing data I receibe this error:

    Using Action : G

    TRXTYPE=S&TENDER=P&PARTNER=VeriSign&VENDOR=MY_VENDOR&USER=MY_USER&PWD=MY_PWDqynQ&ACTION=G&TERM=0&CERTPATH=C:\ColdFusion8\certs&Token=XXX

    Paypal return:

    Field format error: Invalid Token 7 RESULT=7&RESPMSG=Field format error: Invalid Token

  114. Andy says:

    Hi All, I'm using this tag to replace CFX_PAYFLOW on our CFMX (6.1) system.  The CF_PAYFLOW tag works great with our paypal account when calling it directly, but we're having a problem with the main client system, which is a remote PHP4 server.  

    The PAYFLOW functionality is exposed via a CF-based API that accepts WDDX packets (which contain all of the relevant paypal params), takes them apart, and passes the params down to the PAYFLOW tag, and then returns the results as another WDDX packet.  The return packet contains the RESULTSTR from PAYFLOW, as well as a few other values.  

    The problem is that the PHP code on the client system is blowing up when trying to deserialize the WDDX packet constructed from the CF_PAYFLOW results, but it works fine with the packet constructed from the CF*X*_PAYFLOW results.  All I've done is replace the one CFX_PAYFLOW call we have in the code with CF_PAYFLOW, so I think CF_PAYFLOW may be doing something (when creating the tmpResponse query, or when adding the cfhttp.FileContent from the paypal call to the query) that formats RESULTSTR in a way that's slightly different from what CF*X*_PAYFLOW is doing.  

    The CF_PAYFLOW code is very straightforward, and I've done numerous debugging tests trying to figure out exactly what the issue is (cfdumps of the return data/packet look the same to me for CFX_ and CF_PAYFLOW when I eyeball them), so I'm not sure where to look next.  Any suggestions/help would be greatly appreciated –

    Andy

  115. Vern says:

    This may be really lame, if so, I apologize, but, I've been struggling to get to the bottom of all this… I'm using the java based CFX_PayFlowPro that I got from Verisign not all that long ago. I just want to make sure that I correctly understand that the java version of this going away all together, and that the CF_PayFlowPro provided by by RIAforge is designed to replace that, and not some earlier version of their own CFX tag. Whew… Is that correct?

    Thanks!

  116. Ryan says:

    Vern you are correct.  The connection method used by CFX_PayFlowPro will no longer be supported.  There is no update to CFX_PayFlowPro to support the new method.  Instead, use my CF_PayFlowPro tag.  You can delete the CFX_PayFlowPro tag from your system after migrating off of it.  If you need help, I'm available for consulting.

  117. Jammie says:

    I am getting a connection failure message using the CF5 tag.  Any thoughts??

  118. Jammie says:

    On line 65 of PayProFlow.cfm I am getting this error now:
    The server name or address could not be resolved

  119. Ryan says:

    I've received several requests to add a PayPal donate button, so people could send me a contribution for helping them out.  I've added a button on the bottom right sidebar of this site.  Thanks!

  120. Jeff says:

    I've got a couple of sites where the live hostaddress, payflowpro.verisign.com works fine but pilot-payflowpro.verisign.com generates the connection failure error:

    The column name "Connection Failure" is invalid.

    Column names must be valid variable names. They must start with a letter and can only include letters, numbers, and underscores.

    Anybody else running into this? Any ideas why?

    Thanks!

  121. Melinda says:

    We have 3 servers that run our website – I think MS Server Manager with IIS.  2 servers work correctly and the 3rd constantly returns connection failure.  I've trapped the connection failure error and it is always the 3rd server.  

    I added the suggested header changes to cfhttp <cfhttpparam type="Header" name="Accept-Encoding" value="*"> and   <cfhttpparam type="Header" name="TE" value="deflate;q=0">.  I also requested our server admin turn off compression until we can get the problem figured out.  Nothing seems to work in getting the request out from our 3rd server.

    We also have a proxy server that all 3 servers use, but I don't understand why 2 would work flawlessly and the 3rd is always a bomb???  I've been told the servers are exact duplicates in hardware and image.

    Any thoughts for what we should be looking into?

    Thanks!

  122. Melinda says:

    My server issue turned out to be a Windows update that wiped out the proxy settings on the 3rd server…. working for now.  Our server admins are looking into the proxy server.

  123. Ryan says:

    Melinda, I'm glad you got it worked out.

  124. Melinda says:

    Thanks Ryan! I have a better idea what to troubleshoot now with our server admins.

    I apprecate all the work you've done with this cfc!

  125. Rick Anthony says:

    Thanks for the tag!

    This worked beautifully as a drop-in replacement, as advertised.

    One slight tweak I made that might be useful to others: The way you have the tag set up, PayPal will pass the entire name into the "Billing First Name" field (in PayPal Manager, for reporting).

    If you simply add FIRSTNAME and LASTNAME after NAME to the list of fields in PayFlowPro.cfm (line 35), then add those parameters to your call to the tag, everything will be passed in to PayPal as expected.

    I.e.:
    Line 35:<cfloop list="TRXTYPE,TENDER,PARTNER,VENDOR,USER,PWD,ACCT,EXPDATE,AMT,CVV2,COMMENT1,COMMENT2,ACTION,EMAIL,NAME,FIRSTNAME,LASTNAME,STREET,CITY,STATE,ZIP,START,PROFILENAME,PAYPERIOD,OPTIONALTRX,OPTIONALTRXAMT,IP,PHONENUM,TERM,ORIGPROFILEID,ORIGID,ABA,ACCTTYPE" index="field">

    Tag call:
    <cf_payflowpro QUERY          = ""
                        HOSTADDRESS    = ""
                        HOSTPORT       = "443"
                        TIMEOUT        = "30"
                        PROXYADDRESS   = ""
                        PROXYPORT      = ""
                        PROXYLOGON     = ""
                        PROXYPASSWORD  = ""
                        TRXTYPE        = "S"
                        TENDER         = "C"
                        PARTNER        = ""
                        USER           = ""
                        PWD            = ""
                        ACCT           = ""
                        EXPDATE        = ""
                        AMT            = ""
                        COMMENT1       = ""
                        COMMENT2       = ""
                        NAME        = ""
                        FIRSTNAME         = ""
                        LASTNAME        = ""
                        EMAIL        = ""
                        STREET        = ""
                        CITY        = ""
                        STATE        = ""
                        ZIP            = ""
                        BILLTOCOUNTRY = ""
                        PARMLIST = ""
            >

  126. ben says:

    Hi,

    this tag is working well for me using CF7. However, I cannot get it to process test transactions.
    I've used every URL suggested by paypal, and have tried to follow links to posted solutions (all are deal links so far)

    Has anyone gotten this tag to work with any test URL?

    I'm simply getting:

    Result is undefined in result.

    Using a live URL works fine of course (payflowpro.paypal.com)
    the test URL fails: pilot-payflowpro.paypal.com

    paypal is no help. (surprise, surprise)
    they keep suggesting the same test URL, which I've told them is not working for this tag. OUSTSOURCE EVERYTHING TO INDIA! they sound so nice telling you that they haven't got a clue. ballywood for everyone! more dancing and colors! just nothing useful as far as technical info!

    surely someone who speaks english, has run into this issue with this tag and paypal.

  127. EstebanD says:

    @ben

    I just retested the tag using pilot-payflowpro.paypal.com and it worked fine. Try the following.
    1) Make sure you are using https for the test site.
    2) Make sure your paypal manager is in test mode.

  128. ben says:

    @esteban,

    thanks for that.

    1. the https:// seems to be hardcoded in the payflowpro drop in tag.
    2. if I put the paypal manager in test mode, won't it interfere with live transactions for the same account?
       (I know thats not a tag specific question, but …)

  129. EstebanD says:

    @Ben

    Sorry I don't know the answer to (2). We have a independent test account for this purpose.
    I think you can quickly create a new account for testing.

    Maybe before that put a cfdump fter the block that handles the post <cfhtt /> to see what is returning.

    <cfhttp method="POST" url="https://#Attributes.hostaddress#/transaction&quot; resolveurl="no" timeout="#Attributes.TIMEOUT#" port="#Attributes.HOSTPORT#">
       <cfhttpparam type="header" name="Content-Type" VALUE="text/namevalue">
       <cfhttpparam type="header" name="Content-Length" VALUE="#Len(ParmList)#">
       <cfhttpparam type="header" name="Host" value="#Attributes.hostaddress#">
       <cfhttpparam type="header" name="X-VPS-REQUEST-ID" VALUE="#Attributes.requestID#">
       <cfhttpparam type="header" name="X-VPS-CLIENT-TIMEOUT" VALUE="#Attributes.TIMEOUT#">
       <cfhttpparam type="header" name="X-VPS-VITCLIENTCERTIFICATION-ID" VALUE="#Attributes.PARTNER##Attributes.USER#">
       <cfhttpparam type="body" value="#ParmList#">
    </cfhttp>
    <cfdump var="#cfhttp#">

  130. BradB says:

    Hi – thanks for the great tag.  Up until a couple days ago (Friday the 11th) it was a flawless dropin for the CFX_Payflowpro.  It appears to have stopped working, though the code had not been touched at all since mid-February and the code in question has been the same for years.  Using CFMX 7:

    <CF_PAYFLOWPRO QUERY                = "myRESULT"                HOSTADDRESS            = "payflowpro.paypal.com"
            HOSTPORT            = "443"
            TIMEOUT                = "30"
            PROXYADDRESS        = ""
            PROXYPORT            = ""
            PROXYLOGON            = ""
            PROXYPASSWORD        = ""
            TRXTYPE                = "S"
            TENDER                = "C"
            PARTNER                = "VeriSign"
            USER                = ********
            PWD                = ********
            ACCT                = "#cardnumb#"
            EXPDATE                = "#expdate#"
            AMT                = "#fee#"
            CERTPATH            = ********
            QTY                    = "1"
            NAME            = "#cardname#"
            STREET                = "#st1#"
            BILLTOSTREET2        = "#st2#"
            CITY                = "#city#"
            STATE                = "#state#"
            ZIP                    = "#zip#"
            COUNTRY                = "#country#"
            PHONENUM            = "#tempphone#"
            EMAIL                = "#email#"
            SHIPTOFIRSTNAME        = ""
            SHIPTOMIDDLENAME    = ""
            SHIPTOLASTNAME        = ""
            SHIPTOSTREET        = "#sst1#"
            SHIPTOSTREET2        = "#sst2#"
            SHIPTOCITY            = "#scity#"
            SHIPTOSTATE            = "#sstate#"
            SHIPTOZIP            = "#szip#"
            SHIPTOCOUNTRY        = "#scountry#"
    COMMENT1            = "#seasonWord# #year# Registration"
            >

    The above no longer appears to be passing to Verisign, though the CF error is on the next line (usually if the CF hangs on something else the card will be charged but there's no evidence of a transaction):

    <CFIF myRESULT.result IS 0>

    Results in an thrown "Element RESULT is undefined in MYRESULT."

    As I say we've been doing things this way for 4-5 years without a change in this code or any errors.

    I rolled back any recent updates to Server 2003 and Java but no luck.  I was hoping there was some sort of "big" change and this would be happening to loads of folks but so far i have found no mention on any boards.

    Suggestions?

    Thanks!

  131. Ryan says:

    Hi BradB, I'm sorry but this is the first I've heard of that problem.

    You'll need to do some more debugging to see what exactly is being returned from PayPal.  Start by just dumping out myRESULT, and if thats blank you'll need to put some dumps in the tag itself.

  132. BradB says:

    Are these in a CFOUTPUT QUERY enough?
            <p><b>PARMLIST:</b> #PARMLIST#<BR>
            <p><b>RESULTSTR:</b> #RESULTSTR#<BR>
            <p><b>VERSION:</b> #VERSION#<BR><BR>

    Thanks!

  133. ben says:

    in response to BradB.

    Paypal just updated their root SSL certificates a few days ago, and it screwed a lot of folks up. Ryan's tag still works fine, its just that your host may need to update their root certs and add them to the java keystore in cfmx7.
    I had the same issue. it worked fine for years then it failed.

    basically, until you update the certs on your machine with at least G2 certs from verisign, paypal won't answer a http request from coldfusion.

    hope that helps

  134. BradB says:

    Thanks Ryan and ben.  It clearly seems to be related to the cert update, though so far the G2 update (I am also the host) does not seem to resolve the problem.  The folks at Paypal seem to be willing to reluctanty admit an issue, but appear to have no method of resolution.  It may be complicated by the fact that I buy my certs from Comodo and there are G2 root certs from different authorities (Verisign, Thawte, etc.) but Comodo does not seem to even understand what they are and I'm haing trouble getting a Comodo root kit that is compatible with the new Paypal system.

  135. Eleni Hailu says:

    BradB:  I had the same issue like you but after multiple call to paypal I managed to fix the problem.  You need to update the certificate not only in the root but also inside the Coldfusion folder – YOU HAVE TO DO IT IN BOTH PLACES.  Below is the information they provide in connection with this:

    1. Download the certs from VeriSign at
    https://www.verisign.com/support/roots.html

    2. Open zip and location the Cert file that needs to be updated.
    In this case the "VeriSign Class 3 – G2". Take note of it's location
    on the server. Recommend renaming it to have no spaces and then
    putting it in the "C:\CFusiomMX7\runtime\jre\lib\security" folder.

    3. Open command prompt and type "cd c:\CFusionmx7\runtime\jre\bin"
    or the location of the "keytool.exe" file and hit enter.
    Don't try to run the keytool.exe without the next step. It won't
    hurt anything, but it won't do anything either.

    4. Now type the following replacing what it necessary
    (such as the cert file name from step 2 above and alias name)

    keytool -import -trustcacerts – keystore c:/cfusionmx7/runtime/jre/lib/security/cacerts -file c:/cfusionmx7/runtime/jre/lib/security/Class_3_Public_Primary_Certification_Authority_G2.cer -alias VeriSignG2

    5. You'll be prompted for a password and as long as you haven't
    ever changed it, it should be "changeit", which is the default.

    6. You'll be prompted to approve the request. Type "yes"
    without the quotes and hit enter

    7. A bunch of text should appear validating the installation. If you
    get an error, make sure your path and file names are correct in
    the step above.

    8. To verify, go to the jre\lib\security directory in Windows Explorer
    and make sure the files modified date is today's date.

    Hope this will help.

    Thanks,

    Eleni

  136. Chuck says:

    A couple of days ago our CF5 server stopped processing credit cards, is the paypal root cert update why? nothing has changed.. and if so what procedure do I use.. running IIS6.. Thanks

  137. ben says:

    Hi Chuck:

    Have you updated the root certs? That fixed my problem the last time this tag, "stopped" working.   The only time I've seen this tag stop working, is when paypal changes something without telling anyone (like the URL, or requiring the cert update)

    Lemme see if I can't find my post with what I did to update certs.
    also running IIS6

  138. ben says:

    here is one link of paypal helping my confused head:
    https://www.x.com/message/164414#164414

    here is the other link after I figured it out and posted the steps that worked for me:
    https://www.x.com/message/175135#175135

    I can't say if this will help with CF5, or if this is really your issue, but last time it "stopped" working .. this was the fix.

    good luck.

  139. Chuck says:

    thanks, yes nothing changed on our box except it just stopping processing.. could paypal changed their url?

  140. Melinda says:

    Chuck-
    Not sure this will help, but when this happened to me it was related to changes made to our proxy server… the dns name did not work, but fixed by changing to proxy server ip.

  141. Palawan Hotels says:

    I think you can change the url for the paypal

  142. Chuck says:

    to what?

Leave a Reply

You must be logged in to post a comment.