0
我從2factor購買了otp服務並獲得了示例API。 下面的示例API。 此otp將在客戶註冊過程中生成。我希望我能得到幫助。在此先感謝我需要與Magento 2集成otp服務
<?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);
?>
非常感謝。我現在會嘗試。 –