From b929ff62b9378655477c5c826245a24b730927ec Mon Sep 17 00:00:00 2001 From: David Croft Date: Sat, 15 Jul 2000 02:31:17 +0000 Subject: [PATCH] Documentation for pfpro extension git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@28338 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/pfpro.xml | 321 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 321 insertions(+) create mode 100644 functions/pfpro.xml diff --git a/functions/pfpro.xml b/functions/pfpro.xml new file mode 100644 index 0000000000..27a664f163 --- /dev/null +++ b/functions/pfpro.xml @@ -0,0 +1,321 @@ + + Payflow Pro functions + Payflow Pro + + + This extension allows you to process credit cards using Verisign + Payment Services, formerly known as Signio + (&url.pfpro; + + These functions are only available if PHP has been compiled with the + option. You will + require the appropriate SDK for your platform, which may be + downloaded from within the manager + interface once you have registered. + + + Once you have downloaded the SDK you should copy the files from + the lib directory of the + distribution. Copy the header file pfpro.h + to /usr/local/include + and the library file libpfpro.so to + /usr/local/lib. + + + When using these functions, you should call pfpro_init + once before you process any transactions, and + pfpro_cleanup afterwards. You may make any number + of transactions using pfpro_process between the two. + + + These functions have been added in PHP 4.02. + + + + + + pfpro_init + Initialises the Payflow Pro library + + + Description + + + void pfpro_init + + + + + pfpro_init is used to initialise + the Payflow Pro library. It must be called before processing + any transactions. + + + See also pfpro_cleanup. + + + + + + + pfpro_cleanup + Shuts down the Payflow Pro library + + + Description + + + void pfpro_cleanup + + + + + pfpro_cleanup is used to shutdown the + Payflow Pro library cleanly. It should be called after you + have processed any transactions and before your script + terminates. + + + See also pfpro_init. + + + + + + + pfpro_process + Process a transaction with Payflow Pro + + + Description + + + array pfpro_process + array parameters + + string + address + + int + port + + int + timeout + + string + proxy address + + int + proxy port + + string + proxy logon + + string + proxy password + + + + + Returns: An associative array containing the response + + + pfpro_process processes a transaction + with Payflow Pro. The first parameter is an associative + array containing keys and values that will be encoded and + passed to the processor. + + + The second parameter is optional and specifies the host + to connect to. By default this is "test.signio.com", so + you will certainly want to change this to "connect.signio.com" + in order to process live transactions. + + + The third parameter specifies the port to connect on. It + defaults to 443, the standard SSL port. + + + The fourth parameter specifies the timeout to be used, in seconds. + This defaults to 30 seconds. Note that this timeout appears to only + begin once a link to the processor has been established and so your + script could potentially continue for a very long time in the event + of DNS or network problems. + + + The fifth parameter, if required, specifies the hostname of your + SSL proxy. The sixth parameter specifies the port to use. + + + The seventh and eighth parameters specify the logon identity + and password to use on the proxy. + + + The function returns an associative array of the keys and values + in the response. + + + + You must have called pfpro_init before + calling this function. + + + + Payflow Pro example + +<?php + +pfpro_init(); + +$transaction = array(USER => 'mylogin', + PWD => 'mypassword', + TRXTYPE => 'S', + TENDER => 'C', + AMT => 1.50, + ACCT => '4111111111111111', + EXPDATE => '0904' + ); + +$response = pfpro_process($transaction); + +if (!$response) { + die("Couldn't establish link to Signio.\n"); +} + +echo "Signio response code was ".$response[RESULT]; +echo ", which means: ".$response[RESPMSG]."\n"; + +echo "\nThe transaction request: "; +print_r($transaction); + +echo "\nThe response: "; +print_r($response); + +pfpro_cleanup() + +?> + + + + + + + + + + pfpro_process_raw + Process a raw transaction with Payflow Pro + + + Description + + + string pfpro_process_raw + string parameters + string + address + + int + port + + int + timeout + + string + proxy address + + int + proxy port + + string + proxy logon + + string + proxy password + + + + + Returns: A string containing the response. + + + pfpro_process_raw processes a raw transaction + string with Payflow Pro. You should really use + pfpro_process instead, as the encoding + rules of these transactions are non-standard. + + + The first parameter in this case is a string containing the raw + transaction request. All other parameters are the same as with + pfpro_process. The return value is a string + containing the raw response. + + + + You must have called pfpro_init before + calling this function. + + + + Payflow Pro raw example + +<?php + +pfpro_init(); + +$response = pfpro_process("USER=mylogin&PWD[5]=m&ndy&TRXTYPE=S&TENDER=C&AMT=1.50&ACCT=4111111111111111&EXPDATE=0904"); + +if (!$response) { + die("Couldn't establish link to Signio.\n"); +} + +echo "Signio raw response was ".$response; + +pfpro_cleanup() + +?> + + + + + + + + + pfpro_version + Returns the version of the Payflow Pro software + + + Description + + + string pfpro_version + + + + + pfpro_version returns the version string + of the Payflow Pro library. At the time of writing, this was L211. + + + + + + +