From 8f25d61439ed2e195f2ccea661b36c9e1e2b9b4d Mon Sep 17 00:00:00 2001 From: Braunson Yager Date: Mon, 21 Dec 2020 08:56:02 -0500 Subject: [PATCH 1/4] Fixed client-ref key --- src/Channels/NexmoSmsChannel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Channels/NexmoSmsChannel.php b/src/Channels/NexmoSmsChannel.php index cc24d9c..370cbdf 100644 --- a/src/Channels/NexmoSmsChannel.php +++ b/src/Channels/NexmoSmsChannel.php @@ -59,7 +59,7 @@ public function send($notifiable, Notification $notification) 'from' => $message->from ?: $this->from, 'to' => $to, 'text' => trim($message->content), - 'client_ref' => $message->clientReference, + 'client-ref' => $message->clientReference, ]; if ($message->statusCallback) { From eb81e70917a1083f8e3e41bfc88b4c33d12bb8c9 Mon Sep 17 00:00:00 2001 From: Braunson Yager Date: Mon, 21 Dec 2020 08:56:59 -0500 Subject: [PATCH 2/4] Updated client_ref to client-ref --- tests/Channels/NexmoSmsChannelTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Channels/NexmoSmsChannelTest.php b/tests/Channels/NexmoSmsChannelTest.php index 704334b..c45fe27 100644 --- a/tests/Channels/NexmoSmsChannelTest.php +++ b/tests/Channels/NexmoSmsChannelTest.php @@ -27,7 +27,7 @@ public function testSmsIsSentViaNexmo() 'from' => '4444444444', 'to' => '5555555555', 'text' => 'this is my message', - 'client_ref' => '', + 'client-ref' => '', ]) ->once(); @@ -43,7 +43,7 @@ public function testSmsIsSentViaNexmoWithCustomClient() 'from' => '4444444444', 'to' => '5555555555', 'text' => 'this is my message', - 'client_ref' => '', + 'client-ref' => '', ]) ->once(); @@ -74,7 +74,7 @@ public function testSmsIsSentViaNexmoWithCustomFrom() 'from' => '5554443333', 'to' => '5555555555', 'text' => 'this is my message', - 'client_ref' => '', + 'client-ref' => '', ]) ->once(); @@ -90,7 +90,7 @@ public function testSmsIsSentViaNexmoWithCustomFromAndClient() 'from' => '5554443333', 'to' => '5555555555', 'text' => 'this is my message', - 'client_ref' => '', + 'client-ref' => '', ]) ->once(); @@ -121,7 +121,7 @@ public function testSmsIsSentViaNexmoWithCustomFromAndClientRef() 'from' => '5554443333', 'to' => '5555555555', 'text' => 'this is my message', - 'client_ref' => '11', + 'client-ref' => '11', ]) ->once(); @@ -137,7 +137,7 @@ public function testSmsIsSentViaNexmoWithCustomClientFromAndClientRef() 'from' => '5554443333', 'to' => '5555555555', 'text' => 'this is my message', - 'client_ref' => '11', + 'client-ref' => '11', ]) ->once(); From beb576d6148798b388385819a70bd1a2ec38e760 Mon Sep 17 00:00:00 2001 From: Braunson Yager Date: Mon, 21 Dec 2020 09:20:03 -0500 Subject: [PATCH 3/4] Update NexmoSmsChannel.php --- src/Channels/NexmoSmsChannel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Channels/NexmoSmsChannel.php b/src/Channels/NexmoSmsChannel.php index 370cbdf..5cc1879 100644 --- a/src/Channels/NexmoSmsChannel.php +++ b/src/Channels/NexmoSmsChannel.php @@ -63,7 +63,7 @@ public function send($notifiable, Notification $notification) ]; if ($message->statusCallback) { - $payload['client_ref'] = $message->clientReference; + $payload['client-ref'] = $message->clientReference; } return ($message->client ?? $this->nexmo)->message()->send($payload); From c780a55118e7dc3634a57da5c9d26da34c022646 Mon Sep 17 00:00:00 2001 From: Braunson Yager Date: Mon, 21 Dec 2020 09:45:51 -0500 Subject: [PATCH 4/4] Fixed test with old client_ref reference --- tests/Channels/NexmoSmsChannelTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Channels/NexmoSmsChannelTest.php b/tests/Channels/NexmoSmsChannelTest.php index f2fc19c..2286a84 100644 --- a/tests/Channels/NexmoSmsChannelTest.php +++ b/tests/Channels/NexmoSmsChannelTest.php @@ -168,7 +168,7 @@ public function testCallbackIsApplied() 'from' => '4444444444', 'to' => '5555555555', 'text' => 'this is my message', - 'client_ref' => '', + 'client-ref' => '', 'callback' => 'https://example.com', ]) ->once();