infobip / oneapi-php

oneapi-php
https://developer.infobip.com/api
Apache License 2.0
12 stars 12 forks source link

Support of unicode #9

Closed stnw closed 9 years ago

stnw commented 9 years ago

Hi! I need to send SMS in Russian language. But if I understood correctly, I can't do it. So, I tried to set the parameter "dataCoding", but it looks like I can't do it too. If there any possibility to send a message with unicode support? Thanks!

mmiroslav commented 9 years ago

Hi Sergey,

Just send message with Russian characters and it works. Here is the snippet:

<?php
require_once __DIR__ . '/vendor/autoload.php';

use infobip\models\SMSRequest;
use infobip\SmsClient;
use infobip\utils\Logs;

$smsClient = new SmsClient('<USERNAME>', '<PASSWORD>');
$smsClient->login();

$smsMessage = new SMSRequest();
$smsMessage->senderAddress = "<SENDER>";
$smsMessage->address = "<PHONE-NUMBER>";
$smsMessage->message = 'Калинка, калинка, калинка моя! В саду ягода малинка, малинка моя!';

$smsMessageSendResult = $smsClient->sendSMS($smsMessage);

Could you, please, provide us more information about error that you get?

stnw commented 9 years ago

Hi, @mmiroslav ! Sorry for bothering. Looks. like I did something wrong. Now it works. Thank you!