承接 vvvinceocam/svix-php 相关项目开发

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

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

vvvinceocam/svix-php

Composer 安装命令:

composer require vvvinceocam/svix-php

包简介

Unofficial PHP SDK for Svix

README 文档

README

Unofficial PHP SDK for Svix.

Basic usage

<?php

use Svix\Svix;
use Svix\Internal\Model\ApplicationIn;
use Svix\Internal\Model\EndpointIn;
use Svix\Internal\Model\MessageIn;

$client = new Svix('auth token');

// Create an application for a customer
$app = new ApplicationIn();
$app->setName('Super Customer');
$app->setUid('id-from-our-application');
$app = $client->applications->create($app);

// Bind an endpoint
$endpoint = new EndpointIn();
$endpoint->setUrl('https://example.com/customer/endpoint');
$endpoint = $client->endpoints->create($app->getId(), $endpoint);

// Get the secret that customer must use to validate webhook calls
$secret = $client->endpoints->getSecret($app->getId(), $endpoint->getId());

// Send a message to our freshly enrolled customer
$message = new MessageIn();
$message->setEventType('billing.started');
$message->setPayload([
    'some' => 'data',
    'with' => [
        'arbitrary' => 'depth',
    ],
]);
$client->messages->create($app->getId(), $message);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-06