承接 zindua/sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zindua/sdk

Composer 安装命令:

composer require zindua/sdk

包简介

Official Zindua SDK for PHP — transactional email and WhatsApp via POST /api/v1/send.

README 文档

README

Official server-side SDK for Zindua: send transactional email and WhatsApp messages with one API.

Full API reference zindua.run/developers
PHP product page zindua.run/php
Dashboard zindua.run/login
composer require zindua/sdk

Requirements: PHP 8.1+, ext-curl, ext-json. Run only on your server (never in the browser).

Quick start

1. Install

composer require zindua/sdk

2. Configure

# .env — never commit real keys
ZINDUA_API_KEY=znd_live_xxxxxxxxxxxxxxxxxxxxxxxx

3. Send OTP

<?php
require 'vendor/autoload.php';

use Zindua\Client;

$zindua = new Client(['apiKey' => getenv('ZINDUA_API_KEY')]);

$result = $zindua->send([
    'to' => 'user@example.com',
    'template' => 'otp-verification',
    'lang' => 'fr',
    'variables' => ['code' => '482910', 'appName' => 'MyShop'],
]);

echo $result['logId'];

WhatsApp:

$zindua->send([
    'to' => '+243812345678',
    'channel' => 'whatsapp',
    'template' => 'otp-verification',
    'variables' => ['code' => '482910'],
]);

Factory helper

use Zindua\ZinduaFactory;

$zindua = ZinduaFactory::client(); // reads ZINDUA_API_KEY from env

API surface

Method Endpoint Description
send() POST /send Queue email or WhatsApp message
getProject() GET /project Project, plan, channels
getTemplates() GET /templates Synced templates
connect() POST /connect Bind API key to site URL

Laravel

// config/zindua.php
return ['api_key' => env('ZINDUA_API_KEY')];

// AppServiceProvider
$this->app->singleton(Client::class, fn () => new Client([
    'apiKey' => config('zindua.api_key'),
]));

WordPress custom (mu-plugin)

require_once ABSPATH . 'vendor/autoload.php';

$zindua = new \Zindua\Client(['apiKey' => getenv('ZINDUA_API_KEY')]);

Security

  • ZINDUA_API_KEY stays on the server only
  • Validation runs locally before calling the API (same rules as @zindua/sdk TypeScript)
  • API key is never included in error messages

Related

Package Purpose
@zindua/sdk Node.js / TypeScript SDK
@zindua/cli Terminal tools
@zindua/create-app Next.js auth starter
zindua-connect Official WordPress plugin

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固