PHP Class PayWithAmazon\HttpCurl

Inheritance: implements paywithamazon\HttpCurlInterface
Datei anzeigen Open project: amzn/login-and-pay-with-amazon-sdk-php Class Usage Examples

Public Methods

Method Description
__construct ( $config = null ) * Takes user configuration array as input Takes configuration for API call or IPN config
getCurlResponseInfo ( ) * Get the output of Curl Getinfo
httpGet ( $url, $userAgent = null ) * GET using curl for the following situations 1. IPN certificate retrieval 2. Get User Info
httpPost ( $url, $userAgent = null, $parameters = null ) * POST using curl for the following situations 1. API calls 2. IPN certificate retrieval 3. Get User Info
setAccessToken ( $accesstoken ) * Setter for Access token to get the user info
setHttpHeader ( ) * Setter for boolean header to get the user info

Private Methods

Method Description
commonCurlParams ( $url, $userAgent ) * Add the common Curl Parameters to the curl handler $ch Also checks for optional parameters if provided in the config config['cabundle_file'] config['proxy_port'] config['proxy_host'] config['proxy_username'] config['proxy_password']
execute ( $ch ) * Execute Curl request

Method Details

__construct() public method

* Takes user configuration array as input Takes configuration for API call or IPN config
public __construct ( $config = null )

getCurlResponseInfo() public method

* Get the output of Curl Getinfo
public getCurlResponseInfo ( )

httpGet() public method

* GET using curl for the following situations 1. IPN certificate retrieval 2. Get User Info
public httpGet ( $url, $userAgent = null )

httpPost() public method

* POST using curl for the following situations 1. API calls 2. IPN certificate retrieval 3. Get User Info
public httpPost ( $url, $userAgent = null, $parameters = null )

setAccessToken() public method

* Setter for Access token to get the user info
public setAccessToken ( $accesstoken )

setHttpHeader() public method

* Setter for boolean header to get the user info
public setHttpHeader ( )