| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\extra\douyin;
- use yzh52521\EasyHttp\Http;
- class Client extends Base
- {
- /**
- * 设置小程序跳转path
- * @param string $account
- * @return array
- */
- public function setMiniPath(string $account = "",string $order = ""): array
- {
- $param = [
- "account_id" => $account,
- "bind_biz_type" => 0,
- "path_data_list" => [
- [
- "path" => "pages/order/detail?order={$order}",
- "path_type" => 1
- ],
- [
- "path" => "pages/order/detail?order={$order}",
- "path_type" => 2
- ],
- [
- "path" => "pages/order/detail?order={$order}",
- "path_type" => 3
- ]
- ]
- ];
- return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/apps/trade/v2/toolkit/update_merchant_path/", $param)->array();
- }
- /**
- * 查下用户订单
- * @param string $account
- * @param string $openId
- * @return array
- */
- public function queryOrder(string $account = "",string $openId = ""): array
- {
- $param = [
- "account_id" => $account,
- "open_id" => $openId,
- "biz_type" => 1,
- ];
- return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/trade/v2/fulfillment/query_user_certificates/", $param)->array();
- }
- }
|