nasution/zenziva

Zenziva - Indonesia Online SMS Gateway

2.1.0 2020-11-06 00:49 UTC

This package is auto-updated.

Last update: 2024-11-06 09:32:02 UTC


README

This is v2, for previous version please check 1.x branch.

Zenziva provide services to send SMS, WhatsApp, and voice message.

If this library not working for you, or you found any kind of bugs, please create a new issue.

Install

Run composer

composer require nasution/zenziva

Usage

Make sure you already have Zenziva account.

// Regular

require 'vendor/autoload.php';

use Nasution\Zenziva\Zenziva;

$zenziva = new Zenziva('userkey', 'passkey');

// SMS
$zenziva->sms('0812223333', 'Halo');

// WhatsApp
$zenziva->wa('6285551111', 'Halo');

// Voice message
$zenziva->voice('0812223333', 'Halo');
// SMS Masking
$zenziva = new Zenziva('userkey', 'passkey', [
    'masking' => true,
]);

$zenziva->sms('0812223333', 'Halo');
// Zenziva Sms Center
$zenziva = new Zenziva('userkey', 'passkey', [
    'domain' => 'domain_name.com',
]);

$zenziva->sms('0812223333', 'Halo');
// Zenziva WhatsApp Center
$zenziva = new Zenziva('userkey', 'passkey', [
    'domain' => 'domain_name.com',
    'whatsapp_id' => 'whatsapp_id',
]);

$zenziva->wa('6285551111', 'Halo');