PHP Class Mollie_API_Client, mollie-api-php

All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Author: Mollie B.V. ([email protected])
Exibir arquivo Open project: mollie/mollie-api-php Class Usage Examples

Public Properties

Property Type Description
$customers Mollie_API_Resource_Customers RESTful Customers resource.
$customers_mandates Mollie_API_Resource_Customers_Mandates RESTful Customers Mandates resource.
$customers_payments Mollie_API_Resource_Customers_Payments RESTful Customers Payments resource.
$customers_subscriptions Mollie_API_Resource_Customers_Subscriptions RESTful Customers Subscriptions resource.
$issuers Mollie_API_Resource_Issuers RESTful Issuers resource.
$methods Mollie_API_Resource_Methods RESTful Methods resource.
$organizations Mollie_API_Resource_Organizations RESTful Organizations resource. NOTE: requires OAuth access token.
$payments Mollie_API_Resource_Payments RESTful Payments resource.
$payments_refunds Mollie_API_Resource_Payments_Refunds RESTful Payments Refunds resource.
$permissions Mollie_API_Resource_Permissions RESTful Permissions resource. NOTE: requires OAuth access token.
$profiles Mollie_API_Resource_Profiles RESTful Profiles resource. NOTE: requires OAuth access token.
$refunds Mollie_API_Resource_Refunds If you wish to create / get / list / cancel refunds with an API key, use the payment_refunds resource
$settlements Mollie_API_Resource_Settlements RESTful Settlements resource. NOTE: requires OAuth access token.

Protected Properties

Property Type Description
$api_endpoint string
$api_key string
$ch resource
$last_http_response_status_code integer
$oauth_access boolean True if an OAuth access token is set as API key.
$pem_path string
$version_strings array

Public Methods

Method Description
__construct ( )
__destruct ( ) Close any cURL handles, if we have them.
__get ( string $resource_path ) : Mollie_API_Resource_Undefined
addVersionString ( string $version_string )
getApiEndpoint ( ) : string
getLastHttpResponseStatusCode ( ) : integer
performHttpCall ( $http_method, $api_method, $http_body = NULL ) : string Perform an http call. This method is used by the resource specific classes. Please use the $payments property to perform operations on payments.
setAccessToken ( string $access_token )
setApiEndpoint ( string $url )
setApiKey ( string $api_key )
setPemPath ( string $pem_path ) Overwrite the default path to the PEM file. Should only be used by advanced users.
usesOAuth ( ) : boolean

Protected Methods

Method Description
getCompatibilityChecker ( ) : Mollie_API_CompatibilityChecker

Method Details

__construct() public method

public __construct ( )

__destruct() public method

Close any cURL handles, if we have them.
public __destruct ( )

__get() public method

public __get ( string $resource_path ) : Mollie_API_Resource_Undefined
$resource_path string
return Mollie_API_Resource_Undefined

addVersionString() public method

public addVersionString ( string $version_string )
$version_string string

getApiEndpoint() public method

public getApiEndpoint ( ) : string
return string

getCompatibilityChecker() protected method

protected getCompatibilityChecker ( ) : Mollie_API_CompatibilityChecker
return Mollie_API_CompatibilityChecker

getLastHttpResponseStatusCode() public method

Deprecation: Do not use this method, it should only be used internally

performHttpCall() public method

Perform an http call. This method is used by the resource specific classes. Please use the $payments property to perform operations on payments.
public performHttpCall ( $http_method, $api_method, $http_body = NULL ) : string
$http_method
$api_method
$http_body
return string

setAccessToken() public method

public setAccessToken ( string $access_token )
$access_token string OAuth access token, starting with 'access_'

setApiEndpoint() public method

public setApiEndpoint ( string $url )
$url string

setApiKey() public method

public setApiKey ( string $api_key )
$api_key string The Mollie API key, starting with 'test_' or 'live_'

setPemPath() public method

Overwrite the default path to the PEM file. Should only be used by advanced users.
public setPemPath ( string $pem_path )
$pem_path string

usesOAuth() public method

public usesOAuth ( ) : boolean
return boolean

Property Details

$api_endpoint protected_oe property

protected string $api_endpoint
return string

$api_key protected_oe property

protected string $api_key
return string

$ch protected_oe property

protected resource $ch
return resource

$customers public_oe property

RESTful Customers resource.
public Mollie_API_Resource_Customers $customers
return Mollie_API_Resource_Customers

$customers_mandates public_oe property

RESTful Customers Mandates resource.
public Mollie_API_Resource_Customers_Mandates $customers_mandates
return Mollie_API_Resource_Customers_Mandates

$customers_payments public_oe property

RESTful Customers Payments resource.
public Mollie_API_Resource_Customers_Payments $customers_payments
return Mollie_API_Resource_Customers_Payments

$customers_subscriptions public_oe property

RESTful Customers Subscriptions resource.
public Mollie_API_Resource_Customers_Subscriptions $customers_subscriptions
return Mollie_API_Resource_Customers_Subscriptions

$issuers public_oe property

RESTful Issuers resource.
public Mollie_API_Resource_Issuers $issuers
return Mollie_API_Resource_Issuers

$last_http_response_status_code protected_oe property

protected int $last_http_response_status_code
return integer

$methods public_oe property

RESTful Methods resource.
public Mollie_API_Resource_Methods $methods
return Mollie_API_Resource_Methods

$oauth_access protected_oe property

True if an OAuth access token is set as API key.
protected bool $oauth_access
return boolean

$organizations public_oe property

RESTful Organizations resource. NOTE: requires OAuth access token.
public Mollie_API_Resource_Organizations $organizations
return Mollie_API_Resource_Organizations

$payments public_oe property

RESTful Payments resource.
public Mollie_API_Resource_Payments $payments
return Mollie_API_Resource_Payments

$payments_refunds public_oe property

RESTful Payments Refunds resource.
public Mollie_API_Resource_Payments_Refunds $payments_refunds
return Mollie_API_Resource_Payments_Refunds

$pem_path protected_oe property

protected string $pem_path
return string

$permissions public_oe property

RESTful Permissions resource. NOTE: requires OAuth access token.
public Mollie_API_Resource_Permissions $permissions
return Mollie_API_Resource_Permissions

$profiles public_oe property

RESTful Profiles resource. NOTE: requires OAuth access token.
public Mollie_API_Resource_Profiles $profiles
return Mollie_API_Resource_Profiles

$refunds public_oe property

If you wish to create / get / list / cancel refunds with an API key, use the payment_refunds resource
public Mollie_API_Resource_Refunds $refunds
return Mollie_API_Resource_Refunds

$settlements public_oe property

RESTful Settlements resource. NOTE: requires OAuth access token.
public Mollie_API_Resource_Settlements $settlements
return Mollie_API_Resource_Settlements

$version_strings protected_oe property

protected array $version_strings
return array