mollie / mollie-api-php

Mollie API client for PHP
http://www.mollie.com
BSD 2-Clause "Simplified" License
550 stars 189 forks source link

Add support for HTTP proxies #63

Closed willemstuursma closed 6 years ago

willemstuursma commented 7 years ago

There is no way to set HTTP proxies now.

ghost commented 7 years ago

Hi Willem 👋

There are some problems I'd like to resolve before I contribute (I'd like to contribute to this issue since this affects me too); Are you expecting to use the native cURL proxy method? If so, there are various options regarding authentication. See the documentation that has some (version problems) and are you trying to support all various ways of authentication?

Let me know how you'd see this solution.

Thanks, Ricardo.

willemstuursma commented 7 years ago

I guess we should have a connection string similar to Guzzle Options for setting the proxy. The Mollie_Api_Client will then set the right properties on the cURL resource.

/cc @mollierobbert

ghost commented 7 years ago

Let me know what your opinion is @mollierobbert. Thanks! 👍

willemstuursma commented 7 years ago

@mollierobbert is pretty busy today. If it works for Guzzle, it'll work for us too, so go ahead.

willemstuursma commented 7 years ago

@Ricknox any luck with this?

holtkamp commented 6 years ago

Similar issue and PR can be found here: https://github.com/link0/bunq/issues/27

willemstuursma commented 6 years ago

@holtkamp That's a pretty unique requirement of bunq.

Regardless, I think we will release a v2 of this API client somewhere in 2018H1, which will probably use a Guzzle ClientInterface that you can optionally inject.

willemstuursma commented 6 years ago

This will be available in 2.0, which uses Guzzle as the transport. Guzzle can be configured to use proxies and can be injected in the constructor.