Skip to content
Resellers - Add sending credit to a sub-account

Resellers - Add sending credit to a sub-account

By Mounir 1 min read

Add credit to a sub-account

This function lets you add credit to a sub-account (note: only available for reseller accounts).

int Ajout_Credit($compte_mdworks, $ajout_credit, $login, $motdepasse)

  • $compte_mdworks

  • $ajout_credit: amount of credit to add to the sub-account identified by $login and $motdepasse

  • $login: login of the reseller account

  • $motdepasse: password of the reseller account

Warning:

The SOAP server for user management is separate from the regular API:

https://www.eml-srv.com/_soap/serveur.php

Description

Add credit to a sub-account.

$login and $motdepasse are the credentials of the sub-account.

$compte_mdworks is the MDWorks account identifier returned when creating the sub-account.

$ajout_credit is the amount of credits to add.

Parameters (required)

All parameters are required.

Return value

true or false

Error messages

No field must be left empty login

No field must be left empty motdepasse

Authentication error (invalid login / password)

No field must be left empty (MDWorks account identifier, credit, user password).

Unknown user: please select a user that exists

Access denied: this user does not appear to belong to you.

Example with PHP5

try { $client = new SoapClient(null, array('location' => "https://www.eml-srv.com/_soap/serveur.php", 'uri'      => "https://www.eml-srv.com", 'encoding'=>'ISO-8859-1' ));

$variable = $client->Ajout_Credit('431', '500', 'your_login','your_password'); //or //$variable = $client->__soapCall(Ajout_Credit,$parametres);

print_r($variable); } catch (SoapFault $fault) {
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);

}
Last updated on