cvs: phpdoc /en/functions cybermut.xml

From: Date: Mon, 23 Jul 2001 13:19:12 +0000
Subject: cvs: phpdoc /en/functions cybermut.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969336450@lists.php.net to get a copy of this message
dams Mon Jul 23 09:19:12 2001 EDT Added files: /phpdoc/en/functions cybermut.xml Log: Adding Cybermut Index: phpdoc/en/functions/cybermut.xml +++ phpdoc/en/functions/cybermut.xml <reference id="ref.cybermut"> <title>CrŽdit Mutuel CyberMUT functions</title> <titleabbrev>CyberMUT</titleabbrev> <partintro> <simpara> This extension allows you to process credit cards transactions using CrŽdit Mutuel CyberMUT system ( <ulink url="&url.cybermut;">&url.cybermut;</ulink>). </simpara> <simpara> CynerMUT is a popular Web Payment Service in France, provided by the CrŽdit Mutuel bank. If you are foreign in France, these functions will not be useful for you. </simpara> <simpara> These functions are only available if PHP has been compiled with the <link linkend="install.configure.with-cybermut"><option role="configure"> --with-cybermut[=DIR]</option></link> option, where DIR is the location of <filename>libcm-mac.a</filename> and <filename>cm-mac.h</filename>. You will require the appropriate SDK for your platform, which may be sent to you after your CyberMUT's subscription (contact them via Web, or go to the nearest CrŽdit Mutuel). </simpara> <simpara> The use of these functions is almost identical to the original functions, except for the parameters of return for CreerFormulaireCM and CreerReponseCM, which are returned directly by functions PHP, whereas they had passed in reference in the original functions. </simpara> <simpara> These functions have been added in PHP 4.0.6. </simpara> <note> <para> These functions only provide a link to CyberMUT SDK. Be sure to read the CynerMUT Developers Guide for full details of the required parameters. </para> </note> </partintro> <refentry id="function.cybermut_creerformulairecm"> <refnamediv> <refname>cybermut_creerformulairecm</refname> <refpurpose>Generate HTML form of request for payment</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> <funcdef>string <function>pfpro_init</function></funcdef> <paramdef>string <parameter>url_CM</parameter></paramdef> <paramdef>string <parameter>version</parameter></paramdef> <paramdef>string <parameter>TPE</parameter></paramdef> <paramdef>string <parameter>montant</parameter></paramdef> <paramdef>string <parameter>ref_commande</parameter></paramdef> <paramdef>string <parameter>texte_libre</parameter></paramdef> <paramdef>string <parameter>url_retour</parameter></paramdef> <paramdef>string <parameter>url_retour_ok</parameter></paramdef> <paramdef>string <parameter>url_retour_err</parameter></paramdef> <paramdef>string <parameter>langue</parameter></paramdef> <paramdef>string <parameter>code_societe</parameter></paramdef> <paramdef>string <parameter>texte_bouton</parameter></paramdef> </funcprototype> </funcsynopsis> <para> <function>cynermut_creerformulairecm</function> is used to generate the HTML form of request for payment. </para> <example> <title>First step of payment (equiv cgi1.c)</title> <programlisting role="php"> &lt;?php // Directory where are located the keys putenv("CMKEYDIR=/var/creditmut/cles"); // Version number $VERSION="1.2"; $retour = creditmut_creerformulairecm( "https://www.creditmutuel.fr/test/telepaiement/paiement.cgi", $VERSION, "1234567890", "300FRF", $REFERENCE, $TEXTE_LIBRE, $URL_RETOUR, $URL_RETOUR_OK, $URL_RETOUR_ERR, "francais", "company", "Paiement par carte bancaire"); echo $retour; ?&gt; </programlisting> </example> <para> See also <function>cybermut_testmac</function> and <function>cybermut_creerreponsecm</function>. </para> </refsect1> </refentry> <refentry id="function.cybermut_testmac"> <refnamediv> <refname>cybermut_testmac</refname> <refpurpose> Make sure that there no was data diddling contained in the received message of confirmation </refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> <funcdef>bool <function>cybermut_testmac</function></funcdef> <paramdef>string <parameter>code_MAC</parameter></paramdef> <paramdef>string <parameter>version</parameter></paramdef> <paramdef>string <parameter>TPE</parameter></paramdef> <paramdef>string <parameter>cdate</parameter></paramdef> <paramdef>string <parameter>montant</parameter></paramdef> <paramdef>string <parameter>ref_commande</parameter></paramdef> <paramdef>string <parameter>texte_libre</parameter></paramdef> <paramdef>string <parameter>code-retour</parameter></paramdef> </funcprototype> </funcsynopsis> <para> <function>cybermut_testmac</function> is used to make sure that there was not data diddling contained in the received message of confirmation. Pay attention to parameters code-retour and texte-libre, which cannot be evaluated as is, because auf the dash. You must retrieve them by using: <programlisting role="php"> &lt;?php $code_retour=$HTTP_GET_VARS["code-retour"]; $texte_libre=$HTTP_GET_VARS["texte-libre"]; ?&gt; </programlisting> </para> <example> <title>Last step of payment (equiv cgi2.c)</title> <programlisting role="php"> &lt;?php // Make sure that Enable Track Vars is ON. // Directory where are located the keys putenv("CMKEYDIR=/var/creditmut/cles"); // Version number $VERSION="1.2"; $texte_libre = $HTTP_GET_VARS["texte-libre"]; $code_retour = $HTTP_GET_VARS["code-retour"]; $mac_ok = creditmut_testmac($MAC,$VERSION,$TPE,$date,$montant,$reference,$texte_libre,$code_retour); if ($mac_ok) { // // insert data processing here // // $result=creditmut_creerreponsecm("OK"); } else { $result=creditmut_creerreponsecm("Document Falsifie");} ?&gt; </programlisting> </example> <para> See also <function>cybermut_creerformulairecm</function> and <function>cybermut_creerreponsecm</function>. </para> </refsect1> </refentry> <refentry id="function.cybermut_creerreponsecm"> <refnamediv> <refname>cybermut_creerreponsecm</refname> <refpurpose> Generate the acknowledgement of delivery of the confirmation of payment </refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> <funcdef>string <function>cybermut_creerreponsecm</function></funcdef> <paramdef>string <parameter>phrase</parameter></paramdef> </funcprototype> </funcsynopsis> <para> <function>cybermut_creerreponsecm</function> returns a string containing delivery aknowledgement message. </para> <para> The parameter is "OK" if the message of confirmation of the payment were correctly auhentified by <function>cybermut_testmac</function>. Any other chain is regarded as an error message. </para> <para> See also <function>cybermut_creerformulairecm</function> and <function>cybermut_testmac</function>. </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 sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: -->

« previous php.doc (#969336450) next »