cybermut_testmac

( PHP 4 = 4.0.5 )

cybermut_testmac -- Make sure that there no was data diddling contained in the received message of confirmation

Description

bool cybermut_testmac ( string code_MAC, string version, string TPE, string cdate, string montant, string ref_commande, string texte_libre, string code-retour)

 
?php

 
$code_retour=$HTTP_GET_VARS[

 
"code-retour"]

 
;

 
$texte_libre=$HTTP_GET_VARS["texte-libre"]

 
;

 
?





דוגמה 1 .

 
?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

 
=

 

cybermut_testmac($MAC,$VERSION,$TPE,$date,$montant,$reference,$texte_libre,$code_retour)

 
;

 
if

 
($mac_ok

 
)

 
{

 
/

 
/

 
/

 
/

 
insert

 
data

 
processing

 
here

 
/

 
/

 
/

 
/

 
$result=cybermut_creerreponsecm("OK")

 
;

 
}

 
else

 
{

 
$result=cybermut_creerreponsecm("Document

 
Falsifie")

 
;

 
}

 
 
?