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

New implementation of Adyen\HttpClient\ClientInterface

Open trompette opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

The only implementation of

https://github.com/Adyen/adyen-php-api-library/blob/34e9e1f572bfebfe9bd7ab42308a6c06128daec6/src/Adyen/HttpClient/ClientInterface.php#L5

depends on ext-curl which does not play nicely with OuiCar application architecture.

Describe the solution you'd like

Would it be possible to provide a new implementation of Adyen\HttpClient\ClientInterface based on Symfony HttpClient?

Also, it would be nice to be able to configure the actual instance of Symfony\Component\HttpClient\HttpClient to be used by the new implementation.

Describe alternatives you've considered

We already looked into decorating

https://github.com/Adyen/adyen-php-api-library/blob/34e9e1f572bfebfe9bd7ab42308a6c06128daec6/src/Adyen/HttpClient/CurlClient.php#L7

in order to implement the desired behavior but ran into an issue with the response types being arrays.

Additional context

This feature request is somewhat related to #220.

trompette avatar Dec 29 '21 16:12 trompette

They should use the PSR-18 not Symfony interfaces if you ask me.

mike-zukowski avatar Mar 24 '22 15:03 mike-zukowski

Since there are adapters between the two interfaces, I guess it would also work for us.

trompette avatar Mar 24 '22 16:03 trompette

Hi @trompette and @mike-zukowski,

Thanks a lot for reaching out and for these suggestions. However it turns out that as of yet we haven't found a big use-case for changing our client and thus we will leave it like this for now. Apologies for the inconvenience this might cause you.

Best, Jilling Adyen

jillingk avatar Nov 04 '22 14:11 jillingk