- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在我的 wp 项目中,我使用 Assently用于电子签名实现。虽然我有一个帐户并创建了一个 pdf 表单文件供用户填写,但我只是无法继续。我发现文档不清楚。另外,我不清楚需要做什么才能向用户显示处理交易的表单。
因此,我们非常感谢您提供任何帮助/建议以继续前进。
我根据 assently-laravel 尝试了以下操作。但它要求我登录。这里有什么错误?代码:
define('ASSENTLY_DEBUG', true);
define('ASSENTLY_KEY', 'key');
define('ASSENTLY_SECRET', 'secret-generated');
include_once('assently/Assently.php');
$assently = new Assently();
$assently->authenticate(ASSENTLY_KEY, ASSENTLY_SECRET);
$url = 'https://test.assently.com/api/v2/createcasefromtemplate';
$default = array(
'Id' => '5a0e0869-' . rand(1111, 9999) . '-4b79-' . rand(1111, 9999) . '-466ea5cca5ce'
);
$data = array(
'auth' => $assently->auth(),
'templateId' => '0e004e2b-b192-4ce2-8f47-d7a4576d7df6',
'newCaseId' => '5a0e0869-' . rand(1111, 9999) . '-4b79-' . rand(1111, 9999) . '-466ea5cca5ce',
'agentUsername' => ''
);
$data = array(
'json' => $data
);
$options = array(
'http' => array(
'header' => "Content-type: application/json; charset=utf-8\r\n",
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo '<pre>';
print_r($result);
die;
最佳答案
在assently文件夹中创建此类
use Assently\AssentlyCase;
use Exception;
class CustomAssentlyCase extends AssentlyCase
{
public function createFromTemplate($data)
{
$default = [
'newCaseId' => '5a0e0869-'.rand(1111, 9999).'-4b79-'.rand(1111, 9999).'-466ea5cca5ce'
];
$json = array_merge($default, $data);
try{
$response = $this->client->post($this->url('createcasefromtemplate'), [
'auth' => $this->assently->auth(),
'json' => $json
]);
}catch(Exception $e){
print_r($e->getMessage());
}
return $response;
}
}
使用
define('ASSENTLY_DEBUG', true);
define('ASSENTLY_KEY', 'key');
define('ASSENTLY_SECRET', 'secret-generated');
include_once('assently/Assently.php');
include_once('assently/CustomAssentlyCase.php');
$assently = new Assently();
$assently->authenticate(ASSENTLY_KEY, ASSENTLY_SECRET);
$data = array(
'templateId' => '0e004e2b-b192-4ce2-8f47-d7a4576d7df6',
'newCaseId' => '5a0e0869-'.rand(1111, 9999).'-4b79-'.rand(1111, 9999).'-466ea5cca5ce',
'agentUsername' => 'agentUsername' // PUT your agent username here it is required
);
$customAssentlyCase = new CustomAssentlyCase($assently);
$result = $customAssentlyCase->createFromTemplate($data);
print_r($result);
尝试一下,虽然没有经过测试,但应该可以工作。祝你好运。
关于php - 如何在 PHP 中集成 Assently api 进行电子签名交易,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46664406/
Closed. This question needs to be more focused。它当前不接受答案。
如何在 C# 中对存储在 token 中的数字证书中的任何消息进行签名和验证?我已经完成了电子 token 证书的加密和解密。但没有找到任何签名和验证的解决方案。如果有人知道请回复,因为我已经尝试了很
我有以下 .svg 图形: 我正在尝试为电子设置动画,使其沿着圆环的曲率移动(滚动时与页面成比例)直到某个点(可能是电子翻转时电子所在的同一点)此图像的假想 x 轴): 我是网络开发的新手,所以我不确
我的问题是关于配置Cypress以启动某种语言的浏览器实例。 为了: 对本地化(i18n)文本标签进行断言? 检查i18n功能(在语言之间切换) 例如在以下情况下绕过持续集成(CI/CD)的问题: 在
所以我得到了 Retrofit API + Gson 作为转换器,我有 parcelable 类可以传递给各种 Activity ...... @Parcelize data class Generi
桌面应用程序的正确 oauth2 流程是什么?除了桌面应用程序之外,我还有一个使用隐式流的 SPA Web GUI。在那里,如果客户端在 3600 秒后重定向到 IdP 以颁发新的访问 token 并
任何人都可以建议为什么会出现此错误吗?谢谢! 电子(Chromium)开发者控制台出现此错误:“Uncaught SyntaxError:意外的保留字”并引用appentrypoint.js 在控制台
上下文:我有一个需要读取文件才能执行的应用程序ExternalApp.exe:File.ini。此文件包含ExternalApp.exe应用程序的配置,不可读。。解决方案:创建一个电子应用程序来读/写
上下文:我有一个需要读取文件才能执行的应用程序ExternalApp.exe:File.ini。此文件包含ExternalApp.exe应用程序的配置,不可读。。解决方案:创建一个电子应用程序来读/写
我是一名优秀的程序员,十分优秀!