messageway/messagewaylaravel

This package allows you to connect to MSGWay.com server from your laravel applications.

v2.0.1 2024-04-30 05:55 UTC

This package is auto-updated.

Last update: 2024-10-30 07:00:16 UTC


README

messageWay

Latest Version on Packagist Total Downloads MessageWay MessageWay

MessageWay Laravel

This package allows you to connect to MSGWay.com server from your laravel applications.

Available Methods

  • SMS (Iran: 2000, 3000, 9000, 50004)
  • Global SMS (with Twilio)
  • Messenger
  • IVR

Installation

Via Composer

$ composer require messageway/messagewaylaravel

Usage

ApiKey

Please register on MSGWay.com and get apiKey

Environment

Please add environment on .env file

MESSAGE_WAY_APIKEY=''

Send via SMS

use MessageWay\MessageWayLaravel\Facades\MessageWayLaravel;

$message = MessageWayLaravel::sendViaSMS('MOBILE', $templateID);
dump($message);

Send via GapMessenger

use MessageWay\MessageWayLaravel\Facades\MessageWayLaravel;

$message = MessageWayLaravel::sendViaGap('MOBILE', $templateID, [
    'params' => ['param 1 value', 'param 2 value', 'param 3 value']
]);
dump($message);

Send via IVR

use MessageWay\MessageWayLaravel\Facades\MessageWayLaravel;

$templateID = 2;
$message = MessageWayLaravel::sendViaIVR('MOBILE', $templateID);
dump($message);

Verify OTP

use MessageWay\MessageWayLaravel\Facades\MessageWayLaravel;

$verify = MessageWayLaravel::verifyOTP($OTP);
dump($verify);

Status

use MessageWay\MessageWayLaravel\Facades\MessageWayLaravel;

$status = MessageWayLaravel::getStatus($OTPRefrenceID);
dump($status);

License

MIT.