| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace App\Http\Controllers\api\thirdPart\syrius\producer;
- use App\Http\Controllers\api\thirdPart\syrius\beans\Task;
- use Illuminate\Support\Facades\Log;
- class OrderController extends Controller
- {
- public function createOrder(Task $order)
- {
- $this->method = "post";
- $this->data = [(array)$order];
- $this->url = config("api.syrius.request.create_order");
- $response = $this->response();
- if (!$response){
- Log::warning("炬星-创建订单",["msg"=>"服务器通信异常,检查错误日志","data"=>json_encode($order,JSON_UNESCAPED_UNICODE)]);
- return null;
- }
- Log::warning("炬星-创建订单",["msg"=>"成功","data"=>json_encode($order,JSON_UNESCAPED_UNICODE)]);
- return $response;
- }
- public function getOrder(string $id)
- {
- $this->method = "get";
- $this->url = config("api.syrius.request.find_order").$id;
- $response = $this->response();
- if (!$response)dd("服务器通信异常,检查错误日志");
- dd($response->body());
- }
- }
|