PHP Class YandexMoney\API

Inheritance: extends BaseAPI
Show file Open project: yandex-money/yandex-money-sdk-php Class Usage Examples

Public Methods

Method Description
__construct ( $access_token )
accountInfo ( ) : response Returns information about a user's wallet
buildObtainTokenUrl ( string $client_id, string $redirect_uri, string $scope ) : response Builds authorization url for user's browser
checkToken ( )
getAccessToken ( string $client_id, string $code, string $redirect_uri, string $client_secret = NULL ) : response Exchanges temporary authorization code for an access_token.
getAuxToken ( $scope )
incomingTransferAccept ( string $operation_id, string $protection_code = NULL ) : response Accepts incoming transfer with a protection code or deferred transfer.
incomingTransferReject ( string $operation_id ) : response Rejects incoming transfer with a protection code or deferred trasfer.
operationDetails ( string $operation_id ) : response Returns details of operation specified by operation_id.
operationHistory ( array[] $options = NULL ) : response Returns operation history of a user's wallet.
processPayment ( array[] $options ) : response Confirms a payment that was created using the request-payment method.
requestPayment ( array[] $options ) : response Requests a payment.
revokeToken ( string $token, string $revoke_all = false ) : response Revokes a token.
sendAuthenticatedRequest ( $url, $options = [] )

Method Details

__construct() public method

public __construct ( $access_token )

accountInfo() public method

Returns information about a user's wallet
See also: http://api.yandex.com/money/doc/dg/reference/account-info.xml
See also: https://tech.yandex.ru/money/doc/dg/reference/account-info-docpage/
public accountInfo ( ) : response
return response object

buildObtainTokenUrl() public static method

Builds authorization url for user's browser
See also: http://api.yandex.com/money/doc/dg/reference/request-access-token.xml
See also: https://tech.yandex.ru/money/doc/dg/reference/request-access-token-docpage/
public static buildObtainTokenUrl ( string $client_id, string $redirect_uri, string $scope ) : response
$client_id string The client_id that was assigned to the application.
$redirect_uri string URI that the OAuth server sends the authorization result to. Must have a string value that exactly matches the redirect_uri parameter specified in the application registration data. Any additional parameters required for the application can beadded at the end of the string.
$scope string A string of requested permissions(joined list of strings)
return response object

checkToken() public method

public checkToken ( )

getAccessToken() public static method

Exchanges temporary authorization code for an access_token.
See also: http://api.yandex.com/money/doc/dg/reference/obtain-access-token.xml
See also: https://tech.yandex.ru/money/doc/dg/reference/obtain-access-token-docpage/
public static getAccessToken ( string $client_id, string $code, string $redirect_uri, string $client_secret = NULL ) : response
$client_id string The client_id that was assigned to the application.
$code string Temporary token.
$redirect_uri string URI that the OAuth server sends the authorization result to. The value must exactly match the `redirect_uri` value from the previous "authorize" call.
$client_secret string A secret word for verifying the application's authenticity. Specified if the service is registered with the option to verify authenticity.
return response object

getAuxToken() public method

public getAuxToken ( $scope )

incomingTransferAccept() public method

Accepts incoming transfer with a protection code or deferred transfer.
See also: http://api.yandex.com/money/doc/dg/reference/incoming-transfer-accept.xml
See also: https://tech.yandex.ru/money/doc/dg/reference/incoming-transfer-accept-docpage/
public incomingTransferAccept ( string $operation_id, string $protection_code = NULL ) : response
$operation_id string
$protection_code string Used in case of protected transfer. Omitted for deffered transfers
return response object

incomingTransferReject() public method

Rejects incoming transfer with a protection code or deferred trasfer.
See also: http://api.yandex.com/money/doc/dg/reference/incoming-transfer-reject.xml
See also: https://tech.yandex.ru/money/doc/dg/reference/incoming-transfer-reject-docpage/
public incomingTransferReject ( string $operation_id ) : response
$operation_id string
return response object

operationDetails() public method

Returns details of operation specified by operation_id.
See also: http://api.yandex.com/money/doc/dg/reference/operation-details.xml
See also: https://tech.yandex.ru/money/doc/dg/reference/operation-details-docpage/
public operationDetails ( string $operation_id ) : response
$operation_id string
return response object

operationHistory() public method

Returns operation history of a user's wallet.
See also: http://api.yandex.com/money/doc/dg/reference/operation-history.xml
See also: https://tech.yandex.ru/money/doc/dg/reference/operation-history-docpage/
public operationHistory ( array[] $options = NULL ) : response
$options array[] Key-value parameters collection
return response object

processPayment() public method

Confirms a payment that was created using the request-payment method.
See also: http://api.yandex.com/money/doc/dg/reference/process-payment.xml
See also: https://tech.yandex.ru/money/doc/dg/reference/process-payment-docpage/
public processPayment ( array[] $options ) : response
$options array[] Key-value parameters collection
return response object

requestPayment() public method

Requests a payment.
See also: http://api.yandex.com/money/doc/dg/reference/request-payment.xml
See also: https://tech.yandex.ru/money/doc/dg/reference/request-payment-docpage/
public requestPayment ( array[] $options ) : response
$options array[] Key-value parameters collection
return response object

revokeToken() public static method

Revokes a token.
See also: http://api.yandex.com/money/doc/dg/reference/incoming-transfer-reject-xml
See also: https://tech.yandex.ru/money/doc/dg/reference/incoming-transfer-reject-docpage/
public static revokeToken ( string $token, string $revoke_all = false ) : response
$token string A token to be revoked
$revoke_all string
return response object

sendAuthenticatedRequest() public method

public sendAuthenticatedRequest ( $url, $options = [] )