Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 3657

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>pfpro_process</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="Verisign Payflow Pro Functions"
HREF="ref.pfpro.html"><LINK
REL="PREVIOUS"
TITLE="pfpro_process_raw"
HREF="function.pfpro-process-raw.html"><LINK
REL="NEXT"
TITLE="pfpro_version"
HREF="function.pfpro-version.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.pfpro-process-raw.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.pfpro-version.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.pfpro-process"
></A
>pfpro_process</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN237507"
></A
><P
>    (PHP 4 &#62;= 4.0.2, PHP 5)</P
>pfpro_process&nbsp;--&nbsp;Process a transaction with Payflow Pro</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN237510"
></A
><H2
>说明</H2
>array <B
CLASS="methodname"
>pfpro_process</B
> ( array parameters [, string address [, int port [, int timeout [, string proxy_address [, int proxy_port [, string proxy_logon [, string proxy_password]]]]]]] )<BR
></BR
><P
>&#13;   <B
CLASS="function"
>pfpro_process()</B
> processes a transaction
   with Payflow Pro. 
  </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
    Be sure to read the Payflow Pro Developers Guide for full details
    of the required parameters.
   </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN237543"
></A
><H2
>参数</H2
><P
>&#13;   <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><CODE
CLASS="parameter"
>parameters</CODE
></DT
><DD
><P
>&#13;       An associative array containing keys and values that will be encoded
       and passed to the processor.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>address</CODE
></DT
><DD
><P
>&#13;       Specifies the host to connect to. By default this is 
       <TT
CLASS="literal"
>test.signio.com</TT
>, that you will certainly want to
       change this to <TT
CLASS="literal"
>connect.signio.com</TT
> in order to
       process live transactions.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>port</CODE
></DT
><DD
><P
>&#13;       Specifies the port to connect on. It defaults to 443, the standard SSL
       port number.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>timeout</CODE
></DT
><DD
><P
>&#13;       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 case of DNS or network problems.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>proxy_address</CODE
></DT
><DD
><P
>   
       If required, specifies the hostname of your SSL proxy.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>proxy_port</CODE
></DT
><DD
><P
>&#13;       If required, specifies the port of your SSL proxy.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>proxy_logon</CODE
></DT
><DD
><P
>&#13;       If required, specifies the logon identity to use on the SSL proxy.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>proxy_password</CODE
></DT
><DD
><P
>&#13;       If required, specifies the password to use on the SSL proxy.
      </P
></DD
></DL
></DIV
>
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN237589"
></A
><H2
>返回值</H2
><P
>&#13;   Returns an associative array of the keys and values in the response.
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN237592"
></A
><H2
>范例</H2
><P
>&#13;   <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN237595"
></A
><P
><B
>例 1. Payflow Pro example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br /><br />pfpro_init</font><font color="#007700">();<br /><br /></font><font color="#0000BB">$transaction </font><font color="#007700">= array(</font><font color="#DD0000">'USER'&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'mylogin'</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">'PWD'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'mypassword'</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">'PARTNER' </font><font color="#007700">=&gt; </font><font color="#DD0000">'VeriSign'</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">'TRXTYPE' </font><font color="#007700">=&gt; </font><font color="#DD0000">'S'</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">'TENDER'&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'C'</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">'AMT'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#0000BB">1.50</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">'ACCT'&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">'4111111111111111'</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">'EXPDATE' </font><font color="#007700">=&gt; </font><font color="#DD0000">'0909'<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">);<br /><br /></font><font color="#0000BB">$response </font><font color="#007700">= </font><font color="#0000BB">pfpro_process</font><font color="#007700">(</font><font color="#0000BB">$transaction</font><font color="#007700">);<br /><br />if (!</font><font color="#0000BB">$response</font><font color="#007700">) {<br />&nbsp;&nbsp;die(</font><font color="#DD0000">"Couldn't establish link to Verisign.\n"</font><font color="#007700">);<br />}<br /><br />echo </font><font color="#DD0000">"Verisign response code was " </font><font color="#007700">. </font><font color="#0000BB">$response</font><font color="#007700">[</font><font color="#DD0000">'RESULT'</font><font color="#007700">];<br />echo </font><font color="#DD0000">", which means: " </font><font color="#007700">. </font><font color="#0000BB">$response</font><font color="#007700">[</font><font color="#DD0000">'RESPMSG'</font><font color="#007700">] . </font><font color="#DD0000">"\n"</font><font color="#007700">;<br /><br />echo </font><font color="#DD0000">"\nThe transaction request: "</font><font color="#007700">;<br /></font><font color="#0000BB">print_r</font><font color="#007700">(</font><font color="#0000BB">$transaction</font><font color="#007700">);<br /><br />echo </font><font color="#DD0000">"\nThe response: "</font><font color="#007700">;<br /></font><font color="#0000BB">print_r</font><font color="#007700">(</font><font color="#0000BB">$response</font><font color="#007700">);<br /><br /></font><font color="#0000BB">pfpro_cleanup</font><font color="#007700">();<br /><br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.pfpro-process-raw.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.pfpro-version.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>pfpro_process_raw</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.pfpro.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>pfpro_version</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>