robo-meister/accord-flow-api
Composer 安装命令:
composer require robo-meister/accord-flow-api
包简介
Lightweight PHP SDK for connecting to the AccordFlow Signature API.
README 文档
README
The AccordFlow PHP SDK is a small cURL-based client for connecting PHP 8.1+ applications to the AccordFlow Signature API. It supports JSON requests, multipart file uploads, bearer-token authentication, and the tenant header used by local open API mode.
Installation
Add the SDK to your application with Composer. For local development, reference this repository path:
composer config repositories.accordflow path ../signature/sdk/php
composer require robo-meister/accord-flow-api:*
The package requires the PHP curl and json extensions.
Quick start
<?php require __DIR__ . '/vendor/autoload.php'; use AccordFlow\AccordFlowClient; $client = new AccordFlowClient( baseUrl: 'http://localhost:8080', bearerToken: getenv('ACCORDFLOW_TOKEN') ?: null, tenantId: getenv('ACCORDFLOW_TENANT') ?: null, ); $status = $client->status();
Sign JSON payloads
$response = $client->sign([ 'envelopeId' => 456, 'data' => 'Hello world', 'documentType' => 'txt', 'profile' => [ 'countryCode' => 'PL', 'type' => 'EXTERNAL', 'mode' => 'RAW', ], 'username' => 'demo', 'consent' => [ 'accepted' => true, 'method' => 'CHECKBOX', ], ]); $signature = $response['signature'] ?? null; $redirectUrl = $response['redirectUrl'] ?? null;
The signing endpoint requires an existing envelope. Create or look up the
envelopeId before calling sign, and include an accepted consent payload so
the API can capture signer consent evidence. Some providers return redirectUrl
for browser-based handoff flows. Redirect the signer to that URL and store any
returned verificationReference for later verification lookups.
Sign and verify files
$signed = $client->signFile('/path/to/document.pdf', 456, [ 'profileId' => 123, ]); $verification = $client->verifyFile( '/path/to/document.pdf', $signed['signature'], ['profileId' => 123], ); // File signing also requires an existing envelope ID; the helper sends the // second argument as the multipart `envelopeId` form field.
Generic requests
Use the generic helpers when the SDK has not added a typed wrapper yet:
$usage = $client->get('/api/auth/usage/demo'); $createdUser = $client->post('/api/auth/signup', [ 'username' => 'demo', 'password' => 'change-me', ]);
Error handling
Non-2xx responses and transport failures throw AccordFlowException. The
exception includes the HTTP status code and decoded response body when the API
returns JSON.
use AccordFlow\AccordFlowException; try { $client->verify([ 'data' => 'Hello world', 'signature' => $signature, 'documentType' => 'txt', 'username' => 'demo', ]); } catch (AccordFlowException $error) { error_log($error->getMessage()); error_log((string) $error->getStatusCode()); }
robo-meister/accord-flow-api 适用场景与选型建议
robo-meister/accord-flow-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 493 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 06 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 robo-meister/accord-flow-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 robo-meister/accord-flow-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 493
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2026-06-05