<?php
/**
 * 第三方物流订单回调
 * @Copyright (C) 2018 汉潮 All rights reserved.
 * @License http://www.hanchao9999.com
 * @Author xiaogg <xiaogg@sina.cn>
 */
namespace Home\Controller;
class DistributeController extends BaseController {    
    public function notify(){
        $apitype=I('get.apitype');
        if(empty($apitype)){$this->error('第三方类型错误'.$apitype);}
        $dis = new \Common\Vendor\Distribute($apitype);
        $input = file_get_contents("php://input");
        if(empty($input))$input=I('post.');
        if(empty($input))$input=I('get.');
        //file_put_contents('uploads/PAY-'.$apitype.NOW_TIME.'.txt',var_export($input,1));
        $dis->notify_order($input);
    }
}
