bayareawebpro/laravel-trusted-forms

此包已被废弃,不再维护。未建议替代包。

可信表单证书客户端

v1.0 2020-04-29 05:31 UTC

This package is auto-updated.

Last update: 2022-02-12 23:58:37 UTC


README

Laravel HTTP客户端的服务包装器,专为与Active Prospect API配合使用以生成“TCPA合规的可信表单证书”而设计。

composer require bayareawebpro/laravel-trusted-forms
php artisan vendor:publish --tag=config

https://packagist.org.cn/packages/bayareawebpro/laravel-trusted-forms

申请证书

use BayAreaWebPro\TrustedForms\TrustedForms;

$claim = TrustedForms::claimCertificate(request()->only([...]));
$claim->getMaskedCertificateUrl();
$claim->getCertificateToken();
$claim->hasValidCertificate();
$claim->hasValidExpiration();
$claim->hasValidClaims();
$claim->isValid();

$claim->collect('nested.array');
$claim->get('nested.key', 'fallback-values');

读取证书

use BayAreaWebPro\TrustedForms\TrustedForms;

$certificate = TrustedForms::readCertificate($token);
$certificate->getCertificateUrls();
$certificate->hasValidExpiration();
$certificate->hasValidClaims();
$certificate->isValid();

$certificate->collect('nested.array');
$certificate->get('nested.key', 'fallback-values');

可信表单文档

这是一个开源社区项目,并非由ActiveProspect或其附属公司提供。

https://support.activeprospect.com/hc/en-us/categories/200128909-TrustedForm