Skip to content

Commit fc73d7b

Browse files
committed
Fixed USMS-GH driver returning invalid balance
1 parent c5f09aa commit fc73d7b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `sms` will be documented in this file
44

5+
## 2.1.4
6+
7+
- Fixed `USMS-GH` driver returning balance as a string with currency symbol.
8+
59
## 2.1.3
610

711
- Registered the name `sms` for the `SmsChannel` to be used in the `via()` method.

src/Drivers/UsmsGh.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function balance(): null|int
2121
dd($response->object());
2222
}
2323

24-
return $response->json('data.remaining_unit');
24+
return filter_var($response->json('data.remaining_balance'), FILTER_SANITIZE_NUMBER_INT);
2525
}
2626

2727
public function send(array $recipients, string $message, array $mergeData = []): ?array

0 commit comments

Comments
 (0)