If your server requires HTTP requests to be made through a proxy, you can follow these steps to set up proxies for the server-side SDK.

Setup

Set a proxy host and port in your Braintree configuration:

PHP
Braintree_Configuration::proxyHost('http://your-proxy-domain.com');
Braintree_Configuration::proxyPort('8080');

To use an authenticated proxy, you can additionally specify a username and password:

PHP
Braintree_Configuration::proxyUser('username');
Braintree_Configuration::proxyPassword('password');

If you want to specify the type of proxy (cURL's CURLOPT_PROXYTYPE), you can specify it by setting Braintree_Configuration::proxyType(). For example, if you're using a SOCKS5 proxy with a hostname, it would be:

PHP
Braintree_Configuration::proxyType(CURLPROXY_SOCKS5_HOSTNAME);

Still Have Questions?

If you can’t find an answer, give us a call at 877.434.2894 or contact our Support team