Questo metodo può essere utilizzato per modificare la password di un cliente all'interno del sistema.
I parametri richiesti da questo metodo sono:
Il metodo non ha nessun valore di ritorno.
In caso di errore il metodo genererà un'eccezione che riporterà uno dei seguenti codici di errore:
require "vendor/autoload.php" try { $ezPrintSDK = new ezPrintSDKWrapper('http://demo.ezprint.it'); $apiToken = $ezPrintSDK->cLoginAPI('1WHm0icsupAEm9fil9en','yCHZ0nKiyn1MU0DhpgmG'); $customers = $ezPrintSDK->backOffice->bGetCustomers(false); $ezPrintSDK->backoffice->bEditCustomerPassword($customers[0]['customerId'], sha1("old_password"), sha1("new_password")); } catch (Exception $e) { echo 'Error Code: ', $e->getMessage(); } |
try { var ezPrintSDK = require('ezprint-sdk-wrapper'); var sha1 = require('sha1'); ezPrintSDK.initializeWrapper('http://demo.ezprint.it'); var apiToken = ezPrintSDK.cLoginAPI('1WHm0icsupAEm9fil9en','yCHZ0nKiyn1MU0DhpgmG'); var customers = ezPrintSDK.backOffice.bGetCustomers(false); ezPrintSDK.backoffice.bEditCustomerPassword(customer[0].customerId, sha1("old_password"), sha1("new_password")); } catch (ex) { console.log(ex); } |
try { ezPrintSDKWrapper.Client ezPrintSDK = new ezPrintSDKWrapper.Client("http://demo.ezprint.it"); ezPrintSDK.cLoginAPI("1WHm0icsupAEm9fil9en","yCHZ0nKiyn1MU0DhpgmG"); List<ezPrintSDKWrapper.Structures.customerItem> customers = ezPrintSDK.BackOffice.bGetCustomers(false); HashAlgorithm algorithm = SHA1.Create(); StringBuilder sb1 = new StringBuilder(); StringBuilder sb2 = new StringBuilder(); foreach (byte b in algorithm.ComputeHash(Encoding.UTF8.GetBytes("old_password"))) sb1.Append(b.ToString("x2")); foreach (byte b in algorithm.ComputeHash(Encoding.UTF8.GetBytes("new_password"))) sb2.Append(b.ToString("x2")); ezPrintSDK.BackOffice.bValidateCustomerCredentials(customers[0].customerId, sb1.ToString(), sb2.ToString()); } catch (ezPrintException ex) { string ErrorMessage = ex.Message; } |