2016-03-05 49 views
0

我使用下面的SOAP API代碼忘記密碼Magento的以及如何使用使用Magento的功能,郵件perticular用戶罰球API修改密碼的鏈接發送郵件,如果任何簡單mathed相關REST API指南我如何創建休息/肥皂扔在magento中創建忘記密碼webservices?

error_reporting(0); 

$client = new SoapClient('http://127.0.0.1/mycart/api/soap/?wsdl'); 

$session = $client->login('admin', '123456789'); 

$return_array = array(); 

$result = $client->call($session, 'customer.list'); 

$email=addslashes($_POST['email']); 
//$email=addslashes("[email protected]"); 

if(!empty($email)){ 

    foreach ($result as $key=>$value){ 
     //echo $value[email]; 
     if ($value[email]==$email) 
     { 

      $return_array['message']="You will receive an email with a link to reset your password "; 
      $return_array['status']= "1"; 
      echo json_encode($return_array); 
      exit; 
     }elseif ($value[email]!=$email) { 

      $return_array['message']="You are not registered with us. Please sign up to create an account"; 
      $return_array['status']= "2"; 
      echo json_encode($return_array); 
      exit; 
     } 

    } 

} 
else { 

    $return_array['message']="You are not registered with us. Please sign up to create an account "; 
    $return_array['status']= "0"; 
    echo json_encode($return_array); 
    exit; 
} 

exit; 

回答