adyen-php-api-library icon indicating copy to clipboard operation
adyen-php-api-library copied to clipboard

[PW-1066] Use PSR for HTTP client

Open jorge07 opened this issue 9 years ago • 3 comments

It's possible to use Guzzle to use PSR standard and have better integrations? Or php http to be agnostic...

jorge07 avatar Sep 25 '16 20:09 jorge07

Hi @jorge07,

What do you mean by better integrations ? For now we have chosen to use a custom Curl integration to keep the dependencies as minimum as possible.

Regards, Rik Adyen

rikterbeek avatar Oct 14 '16 09:10 rikterbeek

Hi @rikterbeek

I think it's easier deal with PSR-7 rather than a custom responses as simple arrays. Also can be difficult to integrate with other libs due to this non standard usage, and there is no options for middlewares, or a way to prepare a request to be sent... Packages like https://github.com/php-http/httplug gives you an abstraction to let the final user implement his own PSR-7 http client via DI, or you can go directly to guzzle... An standard its always better.

Another question, do you accept pull requests?

jorge07 avatar Oct 14 '16 09:10 jorge07

Hi @jorge07,

We will look into your suggestion. Yes we do!

Regards, Rik Adyen

rikterbeek avatar Oct 14 '16 10:10 rikterbeek