anytimesa / anytime-api-php-sdk Goto Github PK
View Code? Open in Web Editor NEWAnytime api php sdk
Home Page: https://developers.anyti.me/en/api
License: GNU General Public License v3.0
Anytime api php sdk
Home Page: https://developers.anyti.me/en/api
License: GNU General Public License v3.0
Il y aurais un problème dans la doc API, elle renvoi un champs files_status
au lieu de file_status
It seems than the following field can be null in the API:
In this case the normalize
method throw an exception.
I think getActivationDate
should return null if the field is null in the API
In the createSettingObject
method called just above, those lines are already written
When logging is enabled at guzzle client level, the logger can read the content of the body.
Then because of stream usage, the pointer can already be at the end of the stream.
You should replace this line:
anytime-api-php-sdk/src/IO/IO.php
Line 147 in 1769a2d
By:
$this->responseParser->parse((string) $response->getBody())
The __toString method rewind the Stream when the getContents one does not
https://github.com/guzzle/psr7/blob/1.4.2/src/Stream.php#L90
https://github.com/guzzle/psr7/blob/1.4.2/src/Stream.php#L100
Hello!
I am writing to inquire about the compliance of your APIs with the Payment Services Directive 2 (PSD2) API specifications.
I would appreciate if you could provide me with more information on the measures your company has taken to ensure compliance with these technical standards.
Thank you in advance for your attention to this matter.
Sincerely,
Ivars S
Hi,
We're currently using your SDK.
In your ApiClientFactory.php
(method create
), you generate a new instance of a guzzle client.
I'd like to know if you could make it configurable ?
For exemple:
<?php
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
class ApiClientFactory
{
/**
* @var FileReaderInterface
*/
private $fileReader;
/**
* @var ClientInterface
*/
private $client;
/**
* ApiClientFactory constructor.
*
* @param FileReaderInterface|null $fileReader Specific file reader implementing FileReaderInterface. Default is DiskFileReader.
* @param ClientInterface|null $client Specific guzzle client implementing ClientInterface. Default is Client.
*/
public function __construct(FileReaderInterface $fileReader = null, ClientInterface $client = null)
{
if(!$fileReader) {
$fileReader = new DiskFileReader();
}
$this->fileReader = $fileReader;
$this->client = $client ?? new Client([ 'timeout' => 0 ]);
}
/**
* @param array $params Accepted params: version, client-id, client-secret, username, password, private-key
* @param string $environment
* @return ApiClient
*/
public function create($params = [], $environment = Environment::SANDBOX)
{
if(!Environment::isValidEnvironment($environment)) {
throw new \RuntimeException('Invalid environment "' . $environment . '"');
}
$setting = $this->createSettingObject($environment, $params);
$modelResponsePopulator = new ModelResponsePopulator();
$modelResponseFactory = new ModelResponseFactory($modelResponsePopulator);
$jsonResponseParser = new JsonResponseParser();
$binaryResponseParser = new BinaryResponseParser();
return new ApiClient(
$setting,
new IOList(
new IOFactory(
$this->client,
$setting,
new ModelRequestFactory(),
$modelResponseFactory,
new RequestDirectorFactory($setting, $this->fileReader),
new ApiClientExceptionFactory(
$modelResponsePopulator,
$modelResponseFactory,
$jsonResponseParser
),
$modelResponsePopulator,
$jsonResponseParser,
$binaryResponseParser,
new ResponseAuthenticator()
)
)
);
}
There are many other ways to do so, but we would like to be able to pass a custom Guzzle Client.
Hello,
The API don't match the documentation. It return corp/user_addr_1/2 instead of corp/user_addr_line_1/2
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.