From 3ca2f95d0dd8192b43d28a0c0253ee5dc65ca95d Mon Sep 17 00:00:00 2001 From: Yu Wei Chang Date: Thu, 25 Nov 2021 18:18:53 +0800 Subject: [PATCH] modify send single sms api --- src/API.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/API.php b/src/API.php index f01d037..2da3495 100644 --- a/src/API.php +++ b/src/API.php @@ -72,7 +72,15 @@ public function sendBatch(array $messages) */ public function send(Message\Message $message) { - return $this->sendBatch([$message]); + $request = $this->client->newRequest( + 'POST', + $this->client->buildUriWithQuery('/api/mtk/SmSend', ['CharsetURL' => 'UTF-8'] + $message->toArray()), + 'application/x-www-form-urlencoded' + ); + + $response = $this->client->sendRequest($request); + + return $this->parseMessageResponse($response); } /**