File: pfpro.xml

package info (click to toggle)
phpdoc 20020310-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 35,272 kB
  • ctags: 354
  • sloc: xml: 799,767; php: 1,395; cpp: 500; makefile: 200; sh: 140; awk: 51
file content (299 lines) | stat: -rw-r--r-- 10,270 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<?xml version="1.0" encoding="utf-8"?>
 <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.
   </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">
&lt;?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">
&lt;?php

pfpro_init();

$response = pfpro_process("USER=mylogin&amp;PWD[5]=m&amp;ndy&amp;TRXTYPE=S&amp;TENDER=C&amp;AMT=1.50&amp;ACCT=4111111111111111&amp;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:
-->