File: cybermut.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 (226 lines) | stat: -rw-r--r-- 8,667 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
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.4 $ -->
 <reference id="ref.cybermut">
  <title>Cr&eacute;dit Mutuel CyberMUT 関数</title>
  <titleabbrev>CyberMUT</titleabbrev>
  <partintro>
   <simpara>
    この拡張モジュールによりCr&eacute;dit Mutuel CyberMUTシステム(
    <ulink url="&url.cybermut;">&url.cybermut;</ulink>)を用いた
    クレジットカードトランザクションが可能となります。
   </simpara> 
   <simpara>
    CynerMUT は、フランスで有名なWeb支払サービスで、
    Cr&eacute;dit Mutuel bankにより提供されています。フランス人以外には、
    これらの関数は有用ではないでしょう。
   </simpara>
   <simpara>
    これらの関数は、PHPがオプション
    <link linkend="install.configure.with-cybermut"><option role="configure">
    --with-cybermut[=DIR]</option></link>を付けてコンパイルされている
    場合にのみ利用可能です。ただし、DIRは<filename>libcm-mac.a</filename>
    および<filename>cm-mac.h</filename>のある場所です。
    使用するプラットフォーム用の適当なSDKが必要です。
    これは、CyberMUTに登録した後に送られてきます。
    (Web経由で依頼するか、または近くのCr&eacute;dit Mutuelに行ってみて
    ください。)
   </simpara>
   <simpara>
    これらの関数の使用法はほとんど元の関数と同じですが、
    <function>cybermut_creerformulairecm</function>および
    <function>cybermut_creerreponsecm</function>が返すパラメータが異なり
    ます。これらは、PHP関数では直接返されますが、元の関数ではリファレンス
    が渡されます。
   </simpara>
   <simpara>
    これらの関数は、PHP 4.0.6で追加されました。
   </simpara>
   <note>
    <para>
     これらの関数は、CyberMUT SDKへのリンクを提供するだけです。
     必要なパラメータの詳細については、CyberMUT Developers Guideを必ず
     読んでください。
    </para>
   </note>
  </partintro>

  <refentry id="function.cybermut-creerformulairecm">
   <refnamediv>
    <refname>cybermut_creerformulairecm</refname> 
    <refpurpose>支払リクエスト用HTMLフォームを生成</refpurpose>
   </refnamediv>
   <refsect1>
    <title>説明</title>
     <methodsynopsis>
      <type>string</type><methodname>cybermut_creerformulairecm</methodname>
      <methodparam><type>string</type><parameter>url_CM</parameter></methodparam>
      <methodparam><type>string</type><parameter>version</parameter></methodparam>
      <methodparam><type>string</type><parameter>TPE</parameter></methodparam>
      <methodparam><type>string</type><parameter>montant</parameter></methodparam>
      <methodparam><type>string</type><parameter>ref_commande</parameter></methodparam>
      <methodparam><type>string</type><parameter>texte_libre</parameter></methodparam>
      <methodparam><type>string</type><parameter>url_retour</parameter></methodparam>
      <methodparam><type>string</type><parameter>url_retour_ok</parameter></methodparam>
      <methodparam><type>string</type><parameter>url_retour_err</parameter></methodparam>
      <methodparam><type>string</type><parameter>langue</parameter></methodparam>
      <methodparam><type>string</type><parameter>code_societe</parameter></methodparam>
      <methodparam><type>string</type><parameter>texte_bouton</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>cynermut_creerformulairecm</function> は、支払用HTMLフォーム
     を生成するために使用されます。
    </para>
    <example>
     <title>支払いの最初の手順 (cgi1.cと同じ)</title>
     <programlisting role="php">
&lt;?php
// キーがあるディレクトリ
putenv("CMKEYDIR=/var/creditmut/cles");
 
// バージョン番号
$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> 
     <function>cybermut_testmac</function> および
     <function>cybermut_creerreponsecm</function>も参照下さい。
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.cybermut-testmac">
   <refnamediv>
    <refname>cybermut_testmac</refname> 
    <refpurpose>
     受信した確認用メッセージに虚偽のデータが含まれていないことを
     確認する
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>説明</title>
     <methodsynopsis>
      <type>bool</type><methodname>cybermut_testmac</methodname>
      <methodparam><type>string</type><parameter>code_MAC</parameter></methodparam>
      <methodparam><type>string</type><parameter>version</parameter></methodparam>
      <methodparam><type>string</type><parameter>TPE</parameter></methodparam>
      <methodparam><type>string</type><parameter>cdate</parameter></methodparam>
      <methodparam><type>string</type><parameter>montant</parameter></methodparam>
      <methodparam><type>string</type><parameter>ref_commande</parameter></methodparam>
      <methodparam><type>string</type><parameter>texte_libre</parameter></methodparam>
      <methodparam><type>string</type><parameter>code-retour</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>cybermut_testmac</function> は、受信した確認メッセージに
     虚偽のデータが含まれていないことを確認するために使用されます。
     パラメータcode-retour および texte-libreに注意して下さい。
     これらにはダッシュが含まれるためそのまま評価することができません。
     これらは次のように取得する必要があります。
     <programlisting role="php">
&lt;?php
  $code_retour=$HTTP_GET_VARS["code-retour"];
  $texte_libre=$HTTP_GET_VARS["texte-libre"];
?&gt;
     </programlisting>                                   
    </para>
    <example>
     <title>支払いの最後の手順 (cgi2.cと同じ)</title>
     <programlisting role="php">
&lt;?php
// Enable Track Vars が ONになっていることを確認して下さい。
// キーがあるディレクトリ
putenv("CMKEYDIR=/var/creditmut/cles");
 
// バージョン番号
$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) {

  //
  // データ処理をここに挿入
  //
  //

  $result=creditmut_creerreponsecm("OK");
  } else {
  $result=creditmut_creerreponsecm("Document Falsifie");}
 
?&gt;
     </programlisting>
    </example>
    <para> 
     <function>cybermut_creerformulairecm</function>および
     <function>cybermut_creerreponsecm</function>も参照下さい。
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.cybermut-creerreponsecm">
   <refnamediv>
    <refname>cybermut_creerreponsecm</refname>
    <refpurpose>
     支払い確認用画面を生成する
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>説明</title>
     <methodsynopsis>
      <type>string</type><methodname>cybermut_creerreponsecm</methodname>
      <methodparam><type>string</type><parameter>phrase</parameter></methodparam>
     </methodsynopsis>
    <para>
     <function>cybermut_creerreponsecm</function> は、支払終了メッセージを
     含む文字列を返します。
    </para>
    <para>
     支払いの確認メッセージが、<function>cybermut_testmac</function>に
     より正しく認証された場合、パラメータは"OK"です。
     他のチェーンは全てエラーメッセージとみなされます。
    </para>
    <para> 
     <function>cybermut_creerformulairecm</function> および
     <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
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:
-->