Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/textify.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@
'secretkey' => env('REVESMS_SECRETKEY'),
'client_id' => env('REVESMS_CLIENT_ID'),
'sender_id' => env('REVESMS_SENDER_ID'),
'base_uri' => env('REVESMS_BASE_URI', 'https://smpp.revesms.com:7790'),
'balance_uri' => env('REVESMS_BALANCE_URI', 'https://smpp.revesms.com'),
'base_uri' => env('REVESMS_BASE_URI', 'http://apismpp.revesms.com'),
'balance_uri' => env('REVESMS_BALANCE_URI', 'http://apismpp.revesms.com'),
'timeout' => env('REVESMS_TIMEOUT', 30),
'connect_timeout' => env('REVESMS_CONNECT_TIMEOUT', 10),
'verify_ssl' => env('REVESMS_VERIFY_SSL', false),
Expand Down
10 changes: 5 additions & 5 deletions src/Providers/Bangladeshi/ReveSmsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ReveSmsProvider extends BaseProvider
protected function getClientConfig(): array
{
return [
'base_uri' => $this->config['base_uri'] ?? 'https://smpp.revesms.com:7790',
'base_uri' => $this->config['base_uri'] ?? 'http://apismpp.revesms.com',
'timeout' => $this->config['timeout'] ?? 30,
'verify' => $this->config['verify_ssl'] ?? false,
];
Expand All @@ -36,16 +36,16 @@ protected function validateConfig(): void

protected function sendRequest(TextifyMessage $message): array
{
$query = [
$params = [
'apikey' => $this->config['apikey'],
'secretkey' => $this->config['secretkey'],
'callerID' => $message->getFrom() ?? $this->config['sender_id'] ?? 'REVESMS',
'toUser' => $this->formatPhoneNumber($message->getTo()),
'messageContent' => $message->getMessage(),
];

$response = $this->client->get('/sendtext', [
'query' => $query,
$response = $this->client->post('/sendtext', [
'form_params' => $params,
]);

return json_decode($response->getBody()->getContents(), true);
Expand Down Expand Up @@ -134,7 +134,7 @@ public function getBalance(): float
{
try {
// Get balance URI from config or use default
$balanceUri = $this->config['balance_uri'] ?? 'https://smpp.revesms.com';
$balanceUri = $this->config['balance_uri'] ?? 'http://apismpp.revesms.com';

// Create a separate client for balance API if needed
$balanceClient = new \GuzzleHttp\Client([
Expand Down
2 changes: 1 addition & 1 deletion tests/ProvidersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public function getNetwork()
'secretkey' => 'test_secret_key',
'client_id' => 'test_client_id',
'sender_id' => 'TEST',
'balance_uri' => 'https://smpp.revesms.com',
'balance_uri' => 'http://apismpp.revesms.com',
'timeout' => 30,
'verify_ssl' => true,
]);
Expand Down
Loading