Giter Club home page Giter Club logo

sdk-php's People

Contributors

ahmadnazir avatar code-troll avatar dawidkusmierek avatar dependabot[bot] avatar fabianbadoi avatar headcookie avatar ilmarspenneo avatar janflora avatar malek-mohamed avatar mortenthorpe avatar w3dev-dk avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sdk-php's Issues

How to manually send out validations

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.

Support new case file attribute

The case file API has been updated:

  1. Visibility Mode has a default value
  2. Document display mode can be specified (which affects how the signer sees the documents before signing)

The SDK needs to be updated accordingly.

Change abandoned guzzle dependency

The guzzle package has been moved from guzzle/guzzle to guzzlehttp/guzzle. The dependency should be updated according to this change.

Updating Casefile fails

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.

readObject method in ApiConnector

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.

Fatal error in Entity::find on invalid $id

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)

Add methods for writing meta data as key/value pairs

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.

Initialized values are not reset on calling initialize again

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 customer entities

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 user entity

Add a user entity to be able to query basic data about the logged in user.

Supply docment as raw data instead of a file

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.

Possibility to enable exceptions

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.

Null response on Find All CaseFileTemplate method

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.

Casefile getCreatedAt() fails

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.