...
|
...
|
@@ -158,26 +158,16 @@ class AdminOrderController extends AdminBaseController |
|
|
curl_setopt($ch, CURLOPT_POST, 1);//post提交方式
|
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($send));
|
|
|
$res = curl_exec($ch);//运行curl
|
|
|
// $obj = new $res;
|
|
|
echo "<pre/>";
|
|
|
print_r($res);
|
|
|
die;
|
|
|
if($obj->errcode == 0){
|
|
|
echo "<pre/>";
|
|
|
print_r('1');
|
|
|
die;
|
|
|
$dec = json_decode($res) ;
|
|
|
$final = $dec->errcode;
|
|
|
if($final == 0){
|
|
|
Db::commit();
|
|
|
$this->apiResponse('1','操作成功');
|
|
|
}else{
|
|
|
echo "<pre/>";
|
|
|
print_r('2');
|
|
|
die;
|
|
|
Db::rollback();
|
|
|
$this->apiResponse('0',$dec->errmsg);
|
|
|
}
|
|
|
|
|
|
// $a = file_get_contents($res);
|
|
|
echo "<pre/>";
|
|
|
print_r($res);
|
|
|
die;
|
|
|
Db::commit();
|
|
|
$this->apiResponse('1','操作成功');
|
|
|
}else{
|
|
|
Db::rollback();
|
|
|
$this->apiResponse('0','操作失败');
|
...
|
...
|
|