Order.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace app\extra\douyin;
  3. use app\extra\tools\CodeExtend;
  4. use yzh52521\EasyHttp\Http;
  5. class Order extends Base
  6. {
  7. /**
  8. * 订单详情
  9. * @param array $orderList
  10. * @return array
  11. */
  12. public function getOrderDetail(array $orderList = []): array
  13. {
  14. $param = [
  15. "order_id_list" => $orderList,
  16. ];
  17. return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/apps/trade/v2/toolkit/query_certificate_info/", $param)->array();
  18. }
  19. /**
  20. * 加锁、解锁
  21. * @param int $state 1:解锁,2:加锁
  22. * @return array
  23. */
  24. public function orderLock(int $state = 1,string $order_id = "",string $certificate_id = "",string $lock_key = "",string $start = "",string $end = ""): array
  25. {
  26. $param = [
  27. "operation_type" => $state, // 1解锁,2加锁
  28. "order_info_list" => [
  29. [
  30. "certificate_info_list" => [
  31. [
  32. "certificate_id"=> $certificate_id
  33. ]
  34. ],
  35. "lock_key" => $lock_key,
  36. "order_id" => $order_id
  37. ]
  38. ]
  39. ];
  40. return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/apps/trade/v2/toolkit/change_lock_status/",$param)->array();
  41. }
  42. }