Add a credit to a sub-account

This function allows you to add credit to a sub-account (note that this function is only available for reseller accounts). Ajout_Credit($compte_mdworks,$ajout_credit,$login,$motdepasse)

  • account_mdworks
  • add_credit : add a credit on the sub-account determined by $login and $password
  • $login : reseller account login
  • password: password for the reseller account

Warning:

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

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

Description

Add credit to a sub-account.

$login and $password are the sub-account IDs.

$mdworks_account is the identifier of the mdworks account retrieved when the sub-account was created.

$ajout_credit is the number of credits to add

Settings (required)

All parameters are mandatory.

Back

true or false

Error messages

No field should be left empty

No field should be left empty password

Intermediate error (wrong login / password)

No field should be left blank (mdworks account ID, 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', 'votre_login','votre_mot_de_passe'); //ou //$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);

} 

This post is also available in: Français (French)