getDebitList
getDebitList has 1 parameter (string $session_id).
Its response is a getDebitListObj object with 3 attributes.
This function should be called to receive a table of all debit accounts for a reseller. A debit account ID is needed to make purchases.
Parameters
| Parameter | Notes |
|---|---|
| A valid session ID which can be obtained from login() |
Response
Object type: getDebitListObj
getDebitListObj attributes
| Attribute | Notes |
|---|---|
| (string) code | A string containing the code of your response. 000 is a success. See below for a list of codes |
| (string) message | |
| (ArrayOfArray) debitlist | A list of debit accounts with the first row being field names. See below for a list of field names. |
| Codes | Message |
|---|---|
| 000 | Success |
| This is a partial list of codes which may not be clear by their message. | |
| Column | Description |
|---|---|
| c_id | Unique ID |
| c_admin_user_id | User ID of the main administration account |
| c_billing_contact_id | Billing account contact ID |
| c_min_balance | The minimum allowable balance for this account |
| c_current_balance | The current balance |
| c_status | Is the account active (true = 1) |
| c_create_date | Created date (YYYY-MM-DD HH-MM-SS) |
| c_modified_ts | Modified date (YYYY-MM-DD HH-MM-SS) |
Sample Code (using NuSoap)
$soap2 = new soapclient("https://api.max.md/getDebitList.php?wsdl",array( 'trace' => true, 'exceptions' => true, ));
$response = $soap2->getDebitList($my_session_id);
if ($response->code == '000')
{
$debit_list = $response->debitlist;
//handle the debit list
}else{
//handle the error
}
