Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change from SocketAdapter to CurlAdapter for platform independency #20

Open
markdegrootnl opened this issue Nov 30, 2014 · 1 comment
Open

Comments

@markdegrootnl
Copy link

The Zend SocketAdapter is configured to use CA certificates from /etc/ssl/certs but this does not work on OS X or Windows. Is there a way to use the CurlAdapter for the requests?

@juriansluiman
Copy link
Owner

At this moment this is not possible without copying the factory to a custom one and make your changes.

The best way is to take out the HTTP client and make it its own service; then remove the adapter part. In these two lines, the adapter can be removed and the options can be set directly. During the creating of SlmIdealPayment, that was not possible, but now you can simply do this:

$httpClient->setOptions([ /* ... */]);
$client->setHttpClient($httpClient);

This will pass on all adapter options when the request is sent.

Can you do a PR for this? So:

  1. Make the HTTP service a standalone entry in the SM (SlmIdealPayment\Http\Client or something)
  2. Remove the static link to a specific adapter
  3. Perhaps we can introduce another option in the configuration: http_adapter for a string of the adapter name and rename ssl_options to http_options (a BC break, but we're still beta and I think that's OK).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants