[英]How to pass html link to nexmo sms response
一旦确认订单,我想在nexmo sms响应中传递html链接。 但它把它作为一个文本。
这是代码:
$api_key = '********';
$api_secret = '***************';
$number = '*************';
$message = 'Your order has been placed.';
$message .= "<a href='accounts/download_order/'>Download your tickets</a>";
$url = 'https://rest.nexmo.com/sms/json?' . http_build_query([
'api_key' => $api_key,
'api_secret' => $api_secret,
'to' => $number,
'from' => 'NexmoWorks',
'text' => $message
]);
无法将其包含在SMS中,您只能将完整URL包含为纯文本 - 该URL的显示方式取决于最终用户的电话/操作系统。
以下示例;
$url = 'https://rest.nexmo.com/sms/json?';
$url .= http_build_query([
'api_key' => $api_key,
'api_secret' => $api_secret,
'to' => $number,
'from' => 'NexmoWorks',
'text' => $message
]);
SMS中不支持<a>
标签
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.