penneo / sdk-php Goto Github PK
View Code? Open in Web Editor NEWSDK for using Penneo in your own PHP projects
Home Page: https://penneo.com
License: Apache License 2.0
SDK for using Penneo in your own PHP projects
Home Page: https://penneo.com
License: Apache License 2.0
If a customer chooses to send out a CPR validation not using the Penneo system to generate the emails, if someone tries to resend the validation from the web application, the result will be that the validation can't be send.
Investigate whether the email text and email subject can be set after the validation has been activated using the "send" method and the link has been extracted.
If this is possible, update the documentation to specify this as the default procedure when you want to handle email sending yourself.
The sdk requires psr/log
version 1.0
. It should be ~1.0
.
We need to update the documentation and add the following filters for case files and documents:
The case file API has been updated:
The SDK needs to be updated accordingly.
It should be possible to get the validate name of the signer. The validated name comes from NemId.
The guzzle package has been moved from guzzle/guzzle to guzzlehttp/guzzle. The dependency should be updated according to this change.
Updating a casefile or even persisting the same casefile twice fails. The following code snippet fails to execute:
$myCaseFile = new Penneo\CaseFile();
$myCaseFile->setTitle('Demo case file');
Penneo\CaseFile::persist($myCaseFile);
Penneo\CaseFile::persist($myCaseFile);
The exception thrown is:
Stack trace:
#0 /vagrant/src/Util/CaseFileManager.php(15): Penneo\SDK\Entity::persist(Object(Penneo\SDK\CaseFile))
#1 /vagrant/src/run.php(29): Util\CaseFileManager->create()
#2 {main}
thrown in /vagrant/vendor/penneo/penneo-sdk-php/src/Entity.php on line 212
This is because the visibilityMode is not set for the casefile when it is updated.
Hey, i noticed that there is a bug in the readObject
method in the ApiConnector.php
$response = self::callServer($object->getRelativeUrl() . '/' . $object->getId());
if ($response === false) {
return false;
}
The callServer
method return 2 types either GuzzleHttp\Psr7\Response or NULL, so the if ($response === false)
should be
if (!$response)
because it will never returns false.
This is may cause a possible bug if the $response is null and we try to getBody from it.
Passing an invalid $casefile_id
to CaseFile::find($casefileId)
results in a fatal error.
Fatal error: Uncaught Error: Call to a member function getBody() on null in /vendor/penneo/penneo-sdk-php/src/ApiConnector.php:101
Stack trace:
0 /vendor/penneo/penneo-sdk-php/src/Entity.php(25): Penneo\SDK\ApiConnector::readObject(Object(Penneo\SDK\CaseFile))
1 /app/lib/penneoApi.php(42): Penneo\SDK\Entity::find(89579861)
We should support methods for writing case file and document meta data as key/value pairs. This is just helper functions that will just convert data back and forward between native objects and JSON objects (to be stored as a string through the API).
We should be aware that the values can be binary so doing a base64 encode/decode should be mandatory.
Support add/remove validation to a folder similar like in your .NET SDK
https://github.com/Penneo/sdk-net/blob/master/Src/Penneo/(Model)/Folder.cs
AddValidation and RemoveValidation methods
Will you accept pull requests on this?
Duplication #63 its the same issue we had before in readObject
The response could return NULL
and its currently only validate if the response is false
The following properties are not reset if the initialize method is called again. Consider the following scenario:
ApiConnector::initialize(
'key',
'secret',
$endpoint = 'https://app.penneo.com/api/v1',
$user = 1,
$headers = ['Content-type' => 'application/x-www-form-urlencoded']
);
Now we initialize the api connector again:
ApiConnector::initialize(
'key',
'secret'
);
Now the $endpoint
, $user
, and the $headers
are not reset
Add a customer entity to be able to retrieve customer related data through the API. This includes customer master data, branding information, company email signature and email templates.
Add a user entity to be able to query basic data about the logged in user.
It would make sense that the user of the SDK is able to provide documents as raw data (eg. byte array) instead of having to supply a file. This is especially true, if the user generates documents for the sole purpose of sending them through Penneo.
At the moment exceptions are being suppressed and the messages can only be viewed if debug mode is turned on. There should be a way to turn on exceptions without enabling debug mode.
Hey again, i found another bug, in the CaseFileTemplate the relativeURL is set to casefiletype
while its stated in the API doc to be casefile/casefiletype
so if anyone tries to get all available templates it will call the endpoint /casefiletype
which is not found anywhere in the docs.
Add a Docker development environment to make it easier to test and develop.
PHP Fatal error: Uncaught Exception: Failed to parse time string (@) at position 0 (@): Unexpected character in /www/legacy/vendor/penneo/penneo-sdk-php/src/CaseFile.php:416
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.