Developer - API - Account name

function acc_name($purse)

POST Get account name
Parameter Type Value Required Description
$purse string U12345678 Yes Account purse

Sometimes it may happen that API may not work due to server or developer fault. To identify the problem, API returns error code with message what has happend wrong.

Error Code Description
-1 API information is not valid
-2 API was disabled
-3 This IP %s has no access
1 Account does not exist

Code Snippets

<?php
// Include lib
require_once 'path/to/entromoney/api/api.php';

// Api config
$config = array();
$config['api_user']	= 'ACCOUNT_ID';
$config['api_id']	= 'API_ID';
$config['api_pass']	= 'API_PASS';

// Call lib
try {
	$api = new Paygate_Api($config);
}
catch (Paygate_Exception $e) {
	exit($e->getMessage());
}

// Get account name
$res = $api->acc_name('U12345678');
print_r($res);
?>

Response

stdClass Object
(
    [status] => 1
    [result] => FULL NAME
)