mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-17 01:18:55 +00:00

removing the others git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78562 c90b9560-bf6c-de11-be94-00142212c4b1
318 lines
11 KiB
XML
318 lines
11 KiB
XML
<!-- D O N O T E D I T T H I S F I L E ! ! !
|
|
|
|
it is still here for historical reasons only
|
|
(as translators may need to check old revision diffs)
|
|
|
|
if you want to change things documented in this file
|
|
you should now edit the files found under en/reference
|
|
instead -->
|
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.13 $ -->
|
|
<reference id="ref.pfpro">
|
|
<title>Verisign Payflow Pro functions</title>
|
|
<titleabbrev>Verisign Payflow Pro</titleabbrev>
|
|
<partintro>
|
|
<simpara>
|
|
This extension allows you to process credit cards and other financial
|
|
transactions using Verisign Payment Services, formerly known as Signio
|
|
(<ulink url="&url.pfpro;">&url.pfpro;</ulink>).
|
|
</simpara>
|
|
<simpara>
|
|
These functions are only available if PHP has been compiled with the
|
|
<option role="configure">--with-pfpro[=DIR]</option> option. You will
|
|
require the appropriate SDK for your platform, which may be
|
|
downloaded <ulink url="&url.pfpro.download;">from within the manager
|
|
interface</ulink> once you have registered. If you are going to use this
|
|
extension in an SSL-enabled webserver or with other SSL components (such as
|
|
the CURL+SSL extension) you MUST get the beta SDK.
|
|
</simpara>
|
|
<simpara>
|
|
Once you have downloaded the SDK you should copy the files from
|
|
the <filename class="directory">lib</filename> directory of the
|
|
distribution. Copy the header file <filename>pfpro.h</filename>
|
|
to <filename class="directory">/usr/local/include</filename>
|
|
and the library file <filename>libpfpro.so</filename> to
|
|
<filename class="directory">/usr/local/lib</filename>.
|
|
</simpara>
|
|
<simpara>
|
|
When using these functions, you may omit calls to
|
|
<function>pfpro_init</function> and <function>pfpro_cleanup</function>
|
|
as this extension will do so automatically if required. However the
|
|
functions are still available in case you are processing a number of
|
|
transactions and require fine control over the library.
|
|
You may perform any number
|
|
of transactions using <function>pfpro_process</function> between the two.
|
|
</simpara>
|
|
<simpara>
|
|
These functions have been added in PHP 4.0.2.
|
|
</simpara>
|
|
|
|
<note><para>
|
|
These functions only provide a link to Verisign Payment Services. Be sure
|
|
to read the Payflow Pro Developers Guide for full details of the required
|
|
parameters.
|
|
</para></note>
|
|
</partintro>
|
|
|
|
<refentry id="function.pfpro-init">
|
|
<refnamediv>
|
|
<refname>pfpro_init</refname>
|
|
<refpurpose>Initialises the Payflow Pro library</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>void</type><methodname>pfpro_init</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>pfpro_init</function> is used to initialise
|
|
the Payflow Pro library. You may omit this call, in which case
|
|
this extension will automatically call <function>pfpro_init</function>
|
|
before the first transaction.
|
|
</para>
|
|
<para>
|
|
See also <function>pfpro_cleanup</function>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.pfpro-cleanup">
|
|
<refnamediv>
|
|
<refname>pfpro_cleanup</refname>
|
|
<refpurpose>Shuts down the Payflow Pro library</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>void</type><methodname>pfpro_cleanup</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>pfpro_cleanup</function> is used to shutdown the
|
|
Payflow Pro library cleanly. It should be called after you
|
|
have processed any transactions and before the end of your script.
|
|
However you may omit this call, in which case this
|
|
extension will automatically call <function>pfpro_cleanup</function>
|
|
after your script terminates.
|
|
</para>
|
|
<para>
|
|
See also <function>pfpro_init</function>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.pfpro-process">
|
|
<refnamediv>
|
|
<refname>pfpro_process</refname>
|
|
<refpurpose>Process a transaction with Payflow Pro</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>pfpro_process</methodname>
|
|
<methodparam><type>array</type><parameter>parameters</parameter></methodparam>
|
|
|
|
<methodparam choice="opt"><type>string</type><parameter>address</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>proxy address</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>proxy port</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>proxy logon</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>proxy password</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Returns: An associative array containing the response
|
|
</para>
|
|
<para>
|
|
<function>pfpro_process</function> 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.
|
|
</para>
|
|
<para>
|
|
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.
|
|
</para>
|
|
<para>
|
|
The third parameter specifies the port to connect on. It
|
|
defaults to 443, the standard SSL port.
|
|
</para>
|
|
<para>
|
|
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.
|
|
</para>
|
|
<para>
|
|
The fifth parameter, if required, specifies the hostname of your
|
|
SSL proxy. The sixth parameter specifies the port to use.
|
|
</para>
|
|
<para>
|
|
The seventh and eighth parameters specify the logon identity
|
|
and password to use on the proxy.
|
|
</para>
|
|
<para>
|
|
The function returns an associative array of the keys and values
|
|
in the response.
|
|
</para>
|
|
|
|
<note><para>
|
|
Be sure to read the Payflow Pro Developers Guide for full details
|
|
of the required parameters.
|
|
</para></note>
|
|
|
|
<example>
|
|
<title>Payflow Pro example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?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 Verisign.\n");
|
|
}
|
|
|
|
echo "Verisign 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();
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
|
|
|
|
<refentry id="function.pfpro-process-raw">
|
|
<refnamediv>
|
|
<refname>pfpro_process_raw</refname>
|
|
<refpurpose>Process a raw transaction with Payflow Pro</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>pfpro_process_raw</methodname>
|
|
<methodparam><type>string</type><parameter>parameters</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>address</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>proxy address</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>proxy port</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>proxy logon</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>proxy password</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Returns: A string containing the response.
|
|
</para>
|
|
<para>
|
|
<function>pfpro_process_raw</function> processes a raw transaction
|
|
string with Payflow Pro. You should really use
|
|
<function>pfpro_process</function> instead, as the encoding
|
|
rules of these transactions are non-standard.
|
|
</para>
|
|
<para>
|
|
The first parameter in this case is a string containing the raw
|
|
transaction request. All other parameters are the same as with
|
|
<function>pfpro_process</function>. The return value is a string
|
|
containing the raw response.
|
|
</para>
|
|
|
|
<note><para>
|
|
Be sure to read the Payflow Pro Developers Guide for full details
|
|
of the required parameters and encoding rules. You would be
|
|
well advised to use <function>pfpro_process</function> instead.
|
|
</para></note>
|
|
|
|
<example>
|
|
<title>Payflow Pro raw example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?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 Verisign.\n");
|
|
}
|
|
|
|
echo "Verisign raw response was ".$response;
|
|
|
|
pfpro_cleanup();
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
|
|
<refentry id="function.pfpro-version">
|
|
<refnamediv>
|
|
<refname>pfpro_version</refname>
|
|
<refpurpose>Returns the version of the Payflow Pro software</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>pfpro_version</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>pfpro_version</function> returns the version string
|
|
of the Payflow Pro library. At the time of writing, this was L211.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
</reference>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|
|
|