The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PayFlow PRO SDK and PHP

Discussion in 'cPanel Developers' started by unamigo, Jun 16, 2004.

  1. unamigo

    unamigo Member

    Joined:
    Apr 28, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi there, I need help on recompiling PHP in order to install the Verisign PayFlow PRO SDK, please, if you did it before or you think you know how to help me with this...
    Thanks in advance!

    Best regards,

    Pablo
     
  2. jmetcalf

    jmetcalf Member

    Joined:
    Dec 16, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I have done it and am about to do it again this week on one of my servers. I will post a "How To" here when I have verified that nothing has changed since the last time I did it.
     
  3. unamigo

    unamigo Member

    Joined:
    Apr 28, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thank you jmetcalf! ;)
     
  4. jmetcalf

    jmetcalf Member

    Joined:
    Dec 16, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    The following install was on a Fedora Core 2 server. But should function on just about any linux OS.

    Download Payflow Pro Software Development Kit for your OS.

    I used pfpro_linuxrh9.tar.gz for my install.

    FTP/TFTP the file to your linux box and copy it to the /usr/src directory.

    Type:
    Code:
    tar –zxvf pfpro_linuxrh9.tar.gz
    cd /usr/src/verisign/payflowpro/linuxrh9/lib
    ./buildpfpro.sh
    cp pfpro.h /usr/include/
    cp libpfpro.so /usr/lib/
    
    At this point you either need to download the version of PHP that you will be using and untar it into your /usr/src directory or just type:
    Code:
    cd /home/cpapachebuild/buildapache/php-4.3.7/ <--Change the version number to match your version
    If you use the buildapache copy then you will need to type “make clean” once you are in the php directory in order to start fresh.


    Type:
    Code:
     “php -i |grep configure”
    Copy all of the text starting at ./configure and add ‘–-with-pfpro’ to the end of the configure statement. Mine looks like this:

    Code:
    './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gettext' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysql' '--with-openssl' '--enable-discard-path' '--with-pear' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib' '--with-pfpro'
    Hit enter

    If all goes well you should see no errors about missing .h or .so files.

    Once the configure has completed type “make” then “make install” restart your httpd service and type:
    Code:
    php -i |grep 'Payflow Pro'
    You should see the following message:

    “Verisign Payflow Pro support => enabled”


    The only thing left to do is to make your payflow pro certificate visible to php. There are a couple different methods that I have found to do this. Method one is only good if you are not running php in safe mode. Then in your php page that will handle the payflow transitions you will need to add something similar.

    “putenv("PFPRO_CERT_PATH=/path/to/certs/");”

    The “certs” directory is located in the /usr/src/verisign/payflowpro/linuxrh9/ directory.

    If you have safe mode turned on then you will have to copy your “certs” directory to the same directory that your php transaction page is located.


    I have attached a test file that you can use to check your payflow pro install. You will need to edit it and change the username and password to match your verisign account.

    Hope this helps.
     

    Attached Files:

    #4 jmetcalf, Jun 22, 2004
    Last edited: Jun 22, 2004
  5. unamigo

    unamigo Member

    Joined:
    Apr 28, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Great post jmetcalf! :cool:
    Thank you!
     
Loading...

Share This Page