1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- /**
- * 这个是快递回执给erp的信息,目前先写在这 不想在写到api那个文件了
- */
- class Apiexpressv1 extends Start_Controller{
- public function __construct(){
- parent::__construct();
- $this->load->_model('Model_logic_order','api');
- $this->load->_model("Model_logic_ding",'logic_ding');
- }
- //定义方法的调用规则 获取URI第二段值
- public function _remap($arg,$arg_array)
- {
- if($arg == 'notifyusps')//添加
- {
- $this->_notifyusps();
- }else{
- $this->_a();
- }
- }
- public function _a(){
- exit('No direct script access allowed');
- }
- //usps获取快递回执信息
- public function _notifyusps(){
- $str = file_get_contents('PHP://input');
- $data = json_decode($str, true);
- $this->logic_ding->sendToDing(json_encode($data,JSON_UNESCAPED_UNICODE));
-
- echo "SUCCESS";
-
- }
- }
|