In my wp project, I am using Assently for e-signature implementation. Though I have an account and created a pdf form file to be filled by user I just am not able to proceed a bit. I am finding documentation not clear. Also I am not clear about what needs to be done so that user will be shown form to process the transaction.
So, any help/suggestions to proceed forward is appreciated.
I have tried the following based on assently-laravel. But it's asking me for login. What is error here? Code:
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;
0 comments:
Post a Comment