PHP Class Braintree\Configuration

Show file Open project: braintree/braintree_php Class Usage Examples

Public Properties

Property Type Description
$global

Public Methods

Method Description
__construct ( $attribs = [] )
assertGlobalHasAccessTokenOrKeys ( )
assertHasAccessTokenOrKeys ( )
assertHasClientCredentials ( )
assertHasClientId ( )
assertHasClientSecret ( )
authUrl ( )
baseUrl ( ) : string returns the base braintree gateway URL based on config values
caFile ( $sslPath = NULL ) : string sets the physical path for the location of the CA certs
environment ( $value = null )
gateway ( )
getAccessToken ( )
getClientId ( )
getClientSecret ( )
getEnvironment ( )
getMerchantId ( )
getPrivateKey ( )
getProxyHost ( )
getProxyPassword ( )
getProxyPort ( )
getProxyType ( )
getProxyUser ( )
getPublicKey ( )
getTimeout ( )
isAccessToken ( )
isAuthenticatedProxy ( ) : boolean Specified whether or not a username and password have been provided for use with an authenticated proxy
isClientCredentials ( )
isUsingProxy ( ) : boolean Specifies whether or not a proxy is properly configured
logMessage ( string $message ) log message to default logger
merchantId ( $value = null )
merchantPath ( ) : string sets the merchant path based on merchant ID
portNumber ( ) : integer returns the port number depending on environment
privateKey ( $value = null )
protocol ( ) : string returns http protocol depending on environment
proxyHost ( string $value = null ) : string Sets or gets the proxy host to use for connecting to Braintree
proxyPassword ( $value = null )
proxyPort ( string $value = null ) : string Sets or gets the port of the proxy to use for connecting to Braintree
proxyType ( string $value = null ) : string Sets or gets the proxy type to use for connecting to Braintree. This value can be any of the CURLOPT_PROXYTYPE options in PHP cURL.
proxyUser ( $value = null )
publicKey ( $value = null )
reset ( ) resets configuration to default
serverName ( ) : string returns gateway server name depending on environment
setEnvironment ( $value ) Do not use this method directly. Pass in the environment to the constructor.
setMerchantId ( $value ) Do not use this method directly. Pass in the merchantId to the constructor.
setPrivateKey ( $value ) Do not use this method directly. Pass in the privateKey to the constructor.
setPublicKey ( $value ) Do not use this method directly. Pass in the publicKey to the constructor.
sslOn ( ) : boolean returns boolean indicating SSL is on or off for this session, depending on environment
timeout ( integer $value = null ) : integer Sets or gets the read timeout to use for making requests.

Private Methods

Method Description
setProxyHost ( $value )
setProxyPassword ( $value )
setProxyPort ( $value )
setProxyType ( $value )
setProxyUser ( $value )
setTimeout ( $value )

Method Details

__construct() public method

public __construct ( $attribs = [] )

assertGlobalHasAccessTokenOrKeys() public static method

assertHasAccessTokenOrKeys() public method

assertHasClientCredentials() public method

assertHasClientId() public method

public assertHasClientId ( )

assertHasClientSecret() public method

authUrl() public method

public authUrl ( )

baseUrl() public method

returns the base braintree gateway URL based on config values
public baseUrl ( ) : string
return string braintree gateway URL

caFile() public method

sets the physical path for the location of the CA certs
public caFile ( $sslPath = NULL ) : string
return string filepath

environment() public static method

public static environment ( $value = null )

gateway() public static method

public static gateway ( )

getAccessToken() public method

public getAccessToken ( )

getClientId() public method

public getClientId ( )

getClientSecret() public method

public getClientSecret ( )

getEnvironment() public method

public getEnvironment ( )

getMerchantId() public method

public getMerchantId ( )

getPrivateKey() public method

public getPrivateKey ( )

getProxyHost() public method

public getProxyHost ( )

getProxyPassword() public method

public getProxyPassword ( )

getProxyPort() public method

public getProxyPort ( )

getProxyType() public method

public getProxyType ( )

getProxyUser() public method

public getProxyUser ( )

getPublicKey() public method

public getPublicKey ( )

getTimeout() public method

public getTimeout ( )

isAccessToken() public method

public isAccessToken ( )

isAuthenticatedProxy() public static method

Specified whether or not a username and password have been provided for use with an authenticated proxy
public static isAuthenticatedProxy ( ) : boolean
return boolean true if both proxyUser and proxyPassword are present

isClientCredentials() public method

public isClientCredentials ( )

isUsingProxy() public static method

Specifies whether or not a proxy is properly configured
public static isUsingProxy ( ) : boolean
return boolean true if a proxy is configured properly, false if not

logMessage() public method

log message to default logger
public logMessage ( string $message )
$message string

merchantId() public static method

public static merchantId ( $value = null )

merchantPath() public method

sets the merchant path based on merchant ID
public merchantPath ( ) : string
return string merchant path uri

portNumber() public method

returns the port number depending on environment
public portNumber ( ) : integer
return integer portnumber

privateKey() public static method

public static privateKey ( $value = null )

protocol() public method

returns http protocol depending on environment
public protocol ( ) : string
return string http || https

proxyHost() public static method

Sets or gets the proxy host to use for connecting to Braintree
public static proxyHost ( string $value = null ) : string
$value string If provided, sets the proxy host
return string The proxy host used for connecting to Braintree

proxyPassword() public static method

public static proxyPassword ( $value = null )

proxyPort() public static method

Sets or gets the port of the proxy to use for connecting to Braintree
public static proxyPort ( string $value = null ) : string
$value string If provided, sets the port of the proxy
return string The port of the proxy used for connecting to Braintree

proxyType() public static method

Sets or gets the proxy type to use for connecting to Braintree. This value can be any of the CURLOPT_PROXYTYPE options in PHP cURL.
public static proxyType ( string $value = null ) : string
$value string If provided, sets the proxy type
return string The proxy type used for connecting to Braintree

proxyUser() public static method

public static proxyUser ( $value = null )

publicKey() public static method

public static publicKey ( $value = null )

reset() public static method

resets configuration to default
public static reset ( )

serverName() public method

returns gateway server name depending on environment
public serverName ( ) : string
return string server domain name

setEnvironment() public method

Do not use this method directly. Pass in the environment to the constructor.
public setEnvironment ( $value )

setMerchantId() public method

Do not use this method directly. Pass in the merchantId to the constructor.
public setMerchantId ( $value )

setPrivateKey() public method

Do not use this method directly. Pass in the privateKey to the constructor.
public setPrivateKey ( $value )

setPublicKey() public method

Do not use this method directly. Pass in the publicKey to the constructor.
public setPublicKey ( $value )

sslOn() public method

returns boolean indicating SSL is on or off for this session, depending on environment
public sslOn ( ) : boolean
return boolean

timeout() public static method

Sets or gets the read timeout to use for making requests.
public static timeout ( integer $value = null ) : integer
$value integer If provided, sets the read timeout
return integer The read timeout used for connecting to Braintree

Property Details

$global public static property

public static $global