J'ai acheté le service otp de 2factor et j'ai obtenu un exemple d'API. Exemple d'API ci-dessous. Cette otp doit être générée lors de l'enregistrement du client. J'espère que j'aurai de l'aide. Merci d'avanceJ'ai besoin d'intégrer le service otp avec Magento 2
<?php
$YourAPIKey='<YourAPI>';
$OTP='<OTPValue>';
$SentTo='<User10DigitNumber>';
### DO NOT Change anything below this line
$agent= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';
$url = "https://2factor.in/API/V1/$YourAPIKey/SMS/$SentTo/$OTP";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
echo curl_exec($ch);
curl_close($ch);
?>
Merci beaucoup. Je vais l'essayer maintenant. –