更新云芯对接

parent 62ff82f8
......@@ -62,8 +62,10 @@ class ApiController extends Controller
(new ServerFinanceModel($request->appid,$request->key))->accountCheckingDetail($request->input());
}
//退货列表明细
private function ApiAbnormalDetail($request, $id){
(new ServerFinanceModel($request->appid,$request->key))->accountChangeChecking($request->input());
private function ApiAccountChangeChecking($request, $id){
$input = $request->input();
$input['checking_name'] = $request->supplier_name;
(new ServerFinanceModel($request->appid,$request->key))->accountChangeChecking($input);
}
......
......@@ -8,13 +8,13 @@ use DB;
//跟财务接口通讯模型
class ServerFinanceModel
{
private $pur_url ; //采购网址
private $finance_url ; //采购网址
private $appid ; //APPID
private $key ; //密钥
const IS_DEBUG = 0; //是否调试
public function __construct($appid,$key)
{
$this->pur_url = Config('website.URL_PUR');
$this->finance_url = Config('website.URL_FINANCE');
// $this->financeUrl = 'http://szfinance.ichunt.net';
$this->appid = $appid;
$this->key = $key;
......@@ -22,7 +22,7 @@ class ServerFinanceModel
//发送请求
public function push($url,$data,$type = 1){
$data = ExcessEncryption($data,$this->appid,$this->key);
$urls = $this->pur_url.$url;
$urls = $this->finance_url.$url;
$res = (curl($urls,$data));
if (self::IS_DEBUG){
......@@ -42,18 +42,15 @@ class ServerFinanceModel
}
//获取对账单列表
public function accountCheckingList($input){
$url = $this->financeUrl . '/webapi/accountCheckingList';
return $this->push($url,$input);
return $this->push('/thrid/accountCheckingList',$input);
}
//获取对账单列表明细
public function accountCheckingDetail($input){
$url = $this->financeUrl . '/webapi/accountCheckingDetail';
return $this->push($url,$input);
return $this->push('/thrid/accountCheckingDetail',$input);
}
//对账确定
public function accountChangeChecking($input){
$url = $this->financeUrl . '/webapi/accountChangeChecking';
return $this->push($url,$input);
return $this->push('/thrid/accountChangeChecking',$input);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment