Kaynağa Gözat

修改mt4交易密码lib工具

Robin 6 yıl önce
ebeveyn
işleme
b117873879
1 değiştirilmiş dosya ile 18 ekleme ve 0 silme
  1. 18 0
      normandcrm/service/common/lib/Mt4ManagerApi.php

+ 18 - 0
normandcrm/service/common/lib/Mt4ManagerApi.php

@@ -90,6 +90,24 @@ class Mt4ManagerApi
         return $this->_httpRequest($this->url, $data);
     }
 
+    /**
+     * 修改mt4用户交易密码
+     */
+    public function changePassword($login,$password)
+    {
+        $params = array(
+            'cmd' => 'change_password',
+            'login' => trim($login),
+            'password' => trim($password),
+        );
+        $config = Config::findOne(1);                            //获取到配置文件
+        $mt4_pay_ip = $config['mt4_pay_ip'];                     //获取mt4出入金ip
+        $mt4_pay_port = $config['mt4_pay_port'];                 //获取出入金端口
+        $this->url = "http://{$mt4_pay_ip}:{$mt4_pay_port}/api";
+
+        return $this->_httpRequest($this->url, $params);
+    }
+
     /**
      * curl 请求
      */