Order.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. public function getOrderDetail(array $orderList = [])
  8. {
  9. $param = [
  10. "order_id_list" => $orderList,
  11. ];
  12. return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/apps/trade/v2/toolkit/query_certificate_info/", $param)->array();
  13. }
  14. /**
  15. * 加锁、解锁
  16. * @param int $state 1:解锁,2:加锁
  17. * @return array
  18. */
  19. public function orderLock(int $state = 1,string $order_id = "",string $certificate_id = "",string $lock_key = "",string $start = "",string $end = ""): array
  20. {
  21. $param = [
  22. "operation_type" => $state, // 1解锁,2加锁
  23. "order_info_list" => [
  24. [
  25. "certificate_info_list" => [
  26. [
  27. "certificate_id"=> $certificate_id
  28. ]
  29. ],
  30. "lock_key" => $lock_key,
  31. "order_id" => $order_id
  32. ]
  33. ]
  34. ];
  35. return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/apps/trade/v2/toolkit/change_lock_status/",$param)->array();
  36. }
  37. }