Bonjour,
Je bloque complètement sur l'intégration du paiement cic avec webdev.
Si quelqu'un a des sources d'intégration récente ou qui saurait traduire du php en webdev ...
Voici au cas ou les sources php à traduire sous webdev/windev :
Merci d'avance de votre aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 function CMCIC_hmac($CMCIC_Tpe, $data="") { $pass = "YouGotThisPassPhrase"; // OverWrite with Your's ! // A remplacer par votre paramétrage. // --->>> end custom OverWrite ---------------- $k1 = pack("H*",sha1($pass)); $l1 = strlen($k1); $k2 = pack("H*",$CMCIC_Tpe['key']); $l2 = strlen($k2); if ($l1 > $l2): $k2 = str_pad($k2, $l1, chr(0x00)); elseif ($l2 > $l1): $k1 = str_pad($k1, $l2, chr(0x00)); endif; if ($data==""): $d = "CtlHmac".CMCIC_VERSION.$CMCIC_Tpe['tpe']; else: $d = $data; endif; return strtolower(hmac_sha1($k1 ^ $k2, $d)); } function CMCIC_CtlHmac($CMCIC_Tpe) { return sprintf( CMCIC_CTLHMAC, CMCIC_VERSION, $CMCIC_Tpe['tpe'], CMCIC_hmac($CMCIC_Tpe) ); }
Partager