Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 1.23 KB

README.md

File metadata and controls

66 lines (45 loc) · 1.23 KB

Zenziva Client for PHP - v2

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');