(PHP 4 >= 4.0.5)

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


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

cybermut_testmac() 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:

Example 1. Last step of payment (equiv cgi2.c)

// Make sure that Enable Track Vars is ON.
// Directory where are located the keys
// Version number

$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

} else {
  $result=creditmut_creerreponsecm("Document Falsifie");

See also cybermut_creerformulairecm() and cybermut_creerreponsecm().