braintree / braintree_php

Braintree PHP library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
545 stars 225 forks source link

Setting Proxy with AccessToken #264

Closed Palochinmayee closed 4 years ago

Palochinmayee commented 4 years ago

General information

Issue description

We are using access token from server calls. Along with that we need to set Proxy host and port. But unable to set that. There are some documentation I got where we can use Proxy along with other parameters in config(Public key, private key, merchant ID, environment). But How to set proxy with accesstoken ?

hollabaq86 commented 4 years ago

👋 @Palochinmayee, can you confirm you're using an Oauth Access Token? Additionally, you're creating the Braintree gateway instance using an access token similar to the code snippet below?

gateway = Braintree::Gateway.new(
  :access_token => use_access_token_for_merchant
)
hollabaq86 commented 4 years ago

Wanted to add to my earlier comment, you should be able to update the config on your gateway instance like the following:

gateway->config->proxyHost('http://your-proxy-domain.com');
gateway->config->proxyPort('8080');

Let us know if this doesn't work for you!

crookedneighbor commented 4 years ago

This should give you everything you need to set the proxy configuration. If you're still having trouble, contact our support team. https://help.braintreepayments.com/