简体   繁体   English

我如何在Wordpress上将nexmo SMS帐户验证与API集成在一起

[英]how can i integrate nexmo SMS account verification with API on wordpress

I get an API from Nexmo and a want to integrate them on my woocommerce website ,i mean that's. 我从Nexmo获得了一个API,并且想要将它们集成到我的woocommerce网站上,我的意思是。 want to send SMS for account verification after registration. 想要在注册后发送短信以进行帐户验证。 I had used this code `unction mysite_woocommerce_order_status_processing( $order_id ) { 我使用了这段代码`unction mysite_woocommerce_order_status_processing($ order_id){

$mobile="123456"; $移动= “123456”;

$url="****/api.php?username=******&password=1234&source=UPDATE&dmobile=".$mobile."&message='.$msg.' $ URL = “**** / api.php?用户名= ******&口令= 1234&源= UPDATE&dmobile =”。$移动。“&消息= '$ MSG'。 "; “;

$response = wp_remote_get( $url ); $ response = wp_remote_get($ url); //print_r($response); //的print_r($响应);

} add_action( 'woocommerce_order_status_processing','mysite_woocommerce_order_status_processing' );`,but i don't think that what want exactly. } add_action('woocommerce_order_status_processing','mysite_woocommerce_order_status_processing');`,但我不认为到底是什么。
please can help me . 请可以帮助我。

For account verification you can use the Verify API which already does what you need. 对于帐户验证,您可以使用已经完成您需要的验证API There are PHP-specific examples available under "building blocks". 在“构建块”下有一些特定于PHP的示例。

If you do want to send SMS yourself then I recommend you check out the developer documentation for SMS API, it's here: https://developer.nexmo.com/messaging/sms/building-blocks/send-an-sms/php . 如果您确实想自己发送SMS,那么我建议您查看一下SMS API的开发人员文档,该文档位于: https : //developer.nexmo.com/messaging/sms/building-blocks/send-an-sms/php

If you get stuck working through the resources, try asking a more specific question and I or others might be able to help further. 如果您在处理资源方面遇到麻烦,请尝试提出更具体的问题,我或其他人可能会提供进一步的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM