Php Magento忘记密码soap API

Php Magento忘记密码soap API,php,api,magento,soap,Php,Api,Magento,Soap,各位,我是新来的。 我坚持使用Magento API。我正在为我的电子商务网站创建Magento API。我已经创建了所有API,但对于忘记密码API,我没有得到任何解决方案。我使用了默认忘记密码控制器,但它没有向我发送带有更改密码链接的电子邮件检查我的代码,请帮助我设置此忘记密码API。我还搜索了所有文档,但没有得到任何答案。我也张贴了我的代码,所以请参考它,让我知道我哪里有错误 最近我开发了忘记密码MagentoAPI,它工作得很好,但我发现我必须将忘记密码文件名保存到index.php,

各位,我是新来的。 我坚持使用Magento API。我正在为我的电子商务网站创建Magento API。我已经创建了所有API,但对于忘记密码API,我没有得到任何解决方案。我使用了默认忘记密码控制器,但它没有向我发送带有更改密码链接的电子邮件检查我的代码,请帮助我设置此忘记密码API。我还搜索了所有文档,但没有得到任何答案。我也张贴了我的代码,所以请参考它,让我知道我哪里有错误


最近我开发了忘记密码MagentoAPI,它工作得很好,但我发现我必须将忘记密码文件名保存到index.php,这很困难。制作一个api文件夹并将其保存为index.php

 <?php

if(!empty($_REQUEST['email']))

{
$yourCustomerEmail=$postcode = $_REQUEST['email'];
$customer = Mage::getModel('customer/customer')
        ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())
        ->loadByEmail($yourCustomerEmail);
//echo $customer->getId();
        if ($customer->getId()) {

        try {
            $newResetPasswordLinkToken =  Mage::helper('customer')->generateResetPasswordLinkToken();
            $customer->changeResetPasswordLinkToken($newResetPasswordLinkToken);
            $customer->sendPasswordResetConfirmationEmail();
$result = array('action'=> 'send','statuscode'=> '200');
             echo json_encode($result);
            } catch (Exception $exception) {
//echo "Exception";
                Mage::log($exception);
        }
    }
    else
    {
$result = array('action'=> 'failed','statuscode'=> '300');
echo json_encode($result);
    }

}
else
{
$result = array('action'=> 'failed','statuscode'=> '300');
echo json_encode($result);
}
        ?>