cserobiul/burst-transmitsms-api

This API Package for Laravel User who want to use Australia based sms service provider Burst TransmitSMS gateway

v1.1 2022-12-21 10:18 UTC

This package is auto-updated.

Last update: 2024-12-21 14:22:27 UTC


README

This API Package for Laravel User who want to use Australia based sms service provider TransmitSMS gateway

Installation

composer require cserobiul/burst-transmitsms-api

Configuration

No Configuration Need

Use from Controller

Import TransmitsmsAPI class

use Cserobiul\BurstTransmitsmsApi\TransmitsmsAPI;

Publish configuration

php artisan vendor:publish cserobiul/burst-transmitsms-api

Set API_KEY and API_SECRET from config/transmitsms_api.php file

 'API_KEY' => 'b84f52054********f789b******c9f6',
 
 'API_SECRET' => 'b84******66579bb********ca87c9f6',

Single Number SEND SMS Example

At Controller Method

// set your api_key and api_secret from account settings
$apiKey = config('transmitsms_api.API_KEY');
$apiSecret = config('transmitsms_api.API_SECRET');

//create an instance
$api = new TransmitsmsAPI($apiKey, $apiSecret);

//write a message (as per your needed)
$message = 'This sms has been sent from Burst TransmitSMS API throught cserobiul/burst-transmitsms-api package.';
$number = '6104****54**';

//message sent  
$result = $api->sendSms($message, $number);

//check message has been sent or not
 if ($result->error->code == 'SUCCESS') 
    echo "Message Sent Successfully";
 } else {
    echo "Error: {$result->error->description}";
 }

Multiple Number SEND SMS Example

//Coming soon next version

For Raw PHP Client

//follow official github docs
https://github.com/transmitsms/transmitsms-api-php-client

Contribution

Anyone can create any Pull request.