Proxy Servers

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.

SetupAnchorIcon

Set a proxy address and port in your gateway:

  1. Ruby
gateway = Braintree::Gateway.new(
  :environment => :sandbox,
  :merchant_id => "use_your_merchant_id",
  :public_key => "use_your_public_key",
  :private_key => "use_your_private_key",
  :proxy_address => "http://your-proxy-domain.com",
  :proxy_port => "8080",
)

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

  1. Ruby
gateway = Braintree::Gateway.new(
  :proxy_user => "username",
  :proxy_pass => "password",
)

If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more