Пример #1
0
    'facturation.contact_tel'=>'0606060606',
    'facturation.contact_locale'=>'fr_FR',
    'facturation.defaut_enl'=>'on', // Set the adress as default collect adress

    'user.login'=>'jsnow',
    'user.password'=> urlencode($lib->encryptPassword('password')),
);
*/
// Not setting credentials to empty would result in creating a linked account to the parent credentials
$lib->setLogin('');
$lib->setPassword('');
$lib->setKey('');
// Setting environment to 'prod' will create a valid account with test and production API keys
// Creating an account in a 'test' environment would result in an incomplete account
$lib->setEnv('prod');
$response = $lib->postUserSignup($params);
if (!$lib->curl_error && !$lib->resp_error) {
    if ($response == "1") {
        echo '<div class="alert alert-success">You\'ll receive an e-mail confirming that your account was successfully created and now ready for use.</div>';
    } elseif ($response == "0") {
        echo '<div class="alert alert-warning">An error occurred during account creation ! please try again later.</div>';
    } else {
        echo '<pre class="alert alert-danger">';
        print_r(json_decode($response, true));
        echo '</pre>';
    }
} else {
    echo '<div class="alert alert-danger">';
    handle_errors($lib);
    echo '</div>';
}