BConnect POS - Reference PHP

SmsService
in package

SMS service Handles SMS sending functionality through external API

Table of Contents

Properties

$httpClient  : HttpClientInterface
$senderName  : string
$smsApiBaseUrl  : string
$smsApiKey  : string

Methods

__construct()  : mixed
sendSms()  : array<string|int, mixed>
Sends an SMS to one or multiple recipients

Properties

$httpClient read-only

private HttpClientInterface $httpClient

$senderName read-only

private string $senderName

$smsApiBaseUrl read-only

private string $smsApiBaseUrl

Methods

__construct()

public __construct(HttpClientInterface $httpClient, string $smsApiBaseUrl, string $senderName, string $smsApiKey) : mixed
Parameters
$httpClient : HttpClientInterface
$smsApiBaseUrl : string
$senderName : string
$smsApiKey : string

sendSms()

Sends an SMS to one or multiple recipients

public sendSms(string $message, array<string|int, mixed>|string $recipients[, string|null $customSenderName = null ]) : array<string|int, mixed>
Parameters
$message : string

The content of the message to send

$recipients : array<string|int, mixed>|string

A phone number or an array of phone numbers

$customSenderName : string|null = null

Custom sender name (optional)

Return values
array<string|int, mixed>

API response

On this page

Search results