orderNo = $body; return $this; } public function get() { $platformSource = MobileOrder::where('refund_no',$this->orderNo)->value('platform_source'); if($platformSource=='旺卡'){ $params=[ 'app_id'=>ByteDance::appIdTwo(), 'out_refund_no'=>$this->orderNo, ]; $params['sign']=ByteDance::signWangKa($params); } else if ($platformSource=='美美号源') { $params=[ 'app_id'=>ByteDance::appIdThree(), 'out_refund_no'=>$this->orderNo, ]; $params['sign']=ByteDance::signHaoYuan($params); }else{ $params=[ 'app_id'=>ByteDance::appId(), 'out_refund_no'=>$this->orderNo, ]; $params['sign']=ByteDance::sign($params); } $data=ByteDance::httpPost('https://developer.toutiao.com/api/apps/ecpay/v1/query_refund',$params,[],false); $this->data=$data; user_log('ByteDanceQueryRefund',['orderNo'=>$this->orderNo,'data'=>$data]); return $data['err_no']===0; } public function getData(){ return $this->data; } public static function notify($succ=true){ $arr=[ 'err_no'=>$succ?0:1, 'msg'=>$succ?'success':'fail', ]; return json($arr); } }