seven.io/craft
Composer 安装命令:
composer require seven.io/craft
包简介
Send SMS and make text-to-speech calls via seven
README 文档
README
seven SMS & Voice for Craft CMS
Send SMS and text-to-speech messages from Craft CMS and Craft Commerce via the seven gateway.
Features
- SMS Messaging - Send single messages via control panel or programmatically; bulk-send to Craft Commerce customers
- Voice Messaging - Place text-to-speech calls, with XML mode and JSON-response toggle
- Craft Commerce Integration - Bulk messaging with country-based filtering and automatic phone-number extraction
- Advanced Options - Delay, flash SMS, performance tracking, custom labels, foreign IDs
Prerequisites
- Craft CMS 3.1.5 or newer
- (Optional) Craft Commerce 2.x for bulk messaging
- A seven account with API key (How to get your API key)
Installation
Composer
cd /path/to/craft-project
composer require seven.io/craft
./craft install/plugin seven
Plugin Store
Install seven from the Craft Plugin Store.
Configuration
Open Settings > seven in the Craft control panel:
| Field | Description |
|---|---|
| API Key | Your seven API key (required) |
| From | Default sender ID. Up to 16 characters |
Usage
Control Panel
- seven SMS - Send single or bulk SMS
- seven Voice - Place single or bulk voice calls
For bulk Commerce messaging, leave the recipient field empty and pick countries to filter.
Programmatic SMS
use Seven\Craft\Plugin; $sms = Plugin::getInstance()->getSms(); $sms->params ->setTo('+4901234567890') ->setText('Your message') ->setFrom('YourCompany') ->setDelay('2024-12-31 23:59') ->setFlash(true) ->setLabel('campaign-2024') ->setPerformanceTracking(true); $success = $sms->send();
Programmatic Voice
use Seven\Craft\Plugin; $voice = Plugin::getInstance()->getVoice(); $voice->params ->setTo('+4901234567890') ->setText('Hello there') ->setFrom('YourCompany') ->setXml(false) ->setJson(true); $success = $voice->send();
Available parameters
SMS (SmsParams): setTo, setText, setFrom, setDelay, setFlash, setForeignId, setJson, setLabel, setPerformanceTracking
Voice (VoiceParams): setTo, setText, setFrom, setXml, setJson
Error handling
send() returns true for success (API response 100) or false on failure. Detailed errors are logged via Craft's error handler.
Support
Need help? Feel free to contact us or open an issue.
License
seven.io/craft 适用场景与选型建议
seven.io/craft 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 07 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「sms」 「cms」 「commerce」 「Craft」 「tts」 「text2speech」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 seven.io/craft 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 seven.io/craft 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 seven.io/craft 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
GraphQL authentication for your headless Craft CMS applications.
Provides an add-on purchasable entity.
Set Links with a specific language parameter
Supercharged text field validation.
Adds a 'checkout' to a SilverStripe site which links to an Estimate and adds the ability to setup and pay
Display your categories and products on front end of your website
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-03