note 15885 deleted from ref.pfpro by jimw
| From: | jimw@php.net | Date: | Tue, 18 Dec 2001 21:01:49 +0000 |
| Subject: | note 15885 deleted from ref.pfpro by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23235@lists.php.net to get a copy of this message | ||
I've done one better; I've created an Include file which emulates the up and coming
php_pfpro.dll (extension) for Win32 users.
Just copy out the code, save it in your Include folder as php_pfpro.inc, include the file at the top
of any script you want to call the functions from and your in-business!
The formatting of this code, after I placed it in the section, got all jacked up -- nonetheless, you
should be able to reformat it in your text editor, no prob.
Since the code is too long for one posting, I've split it into PART1 and PART2 -- just copy out
the parts and paste them together.
I am submitting this code to Verisign for potential inclusion in the SDK for PHP (at least Win32)
support.
Jason
PART1
------------------
<?php
/* { PHP_PFPRO.INC }
This file effectively acts as a fill-in or replacement for the missing PHP_PFPRO.DLL extension
for Win32 Platforms. This INCLUDE file was written and tested using PHP 4.0.6.
For instructions on how to use these functions, please go to:
http://www.php.net/manual/en/ref.pfpro.php
IMPORTANT: Before you use this INCLUDE file, you must set the following environment
variable, or this script will not work.
PFPRO_CERT_PATH = C:\Verisign\payflowpro\win32\certs <- or whatever your path is.
The following functions are present, but do *nothing* -- they are here for compatibility
only. I put them here so that when the PHP_PFPRO.DLL becomes available, you won't have
to change your code.
functions:
pfpro_init() : returns NULL
pfpro_cleanup() : returns NULL
pfpro_version() normally returns the version string of the PayFlowPro Library.
However, the function in this INCLUDE file returns the version of the *executable*.
It was frustrating indeed trying to figure out why the pfpro stuff wasn't working... I spent
a couple of days in News Groups and on the phone with Verisign... no one knows... Ahhhh... the
joy of Open Source -- I decided something had to be done (gosh darn-it) -- so I took it upon
myself to write a solution and end my frustration, and the frustration of countless others out
there fighting with the same annoying issue. A hero am I, no! -- just a geek on a mission.
In a nutshell, these functions should work nearly identical to the *coming soon* pfpro extension,
although, I am not totally certain, as I've never seen the official pfpro functions in
action, I'm
only going by what the PHP manual says they are suppose to do... plus, I think, a little of what
I want them to do... so having said that, use this INCLUDE file at your own risk, there is no
warranty, guarantee or otherwise.
It's now 2am, and I've finished all the testing... man, I am zonked!
Enjoy,
Jason Caldwell (10.06.2001)
jason@thinkingman.org */
/* continued on next thread (below) */