|
|
@@ -1585,6 +1585,25 @@ class wxUtil
|
|
|
return $behind . $fileName;
|
|
|
}
|
|
|
|
|
|
+ public static function applySetOrderPathInfo($merchant, $isOpen = 0)
|
|
|
+ {
|
|
|
+ $accessToken = self::getMiniProgramAccessToken($merchant, $isOpen);
|
|
|
+ $url = "https://api.weixin.qq.com/wxa/security/applysetorderpathinfo?component_access_token={$accessToken}";
|
|
|
+ $curl = new curl\Curl();
|
|
|
+ $appId = $merchant['miniAppId'] ?? '';
|
|
|
+ $data = [
|
|
|
+ "batch_req" => [
|
|
|
+ "appid_list" => [$appId],
|
|
|
+ "path" => "pages/order/list",
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+ $result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
|
|
|
+ $respond = Json::decode($result);
|
|
|
+ echo "<pre>";
|
|
|
+ print_r($respond);
|
|
|
+ echo '申请设置订单页path信息 设置OK';
|
|
|
+ }
|
|
|
+
|
|
|
//隐私协议设置 ssh 20211213
|
|
|
//接口说明 https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/privacy_config/set_privacy_setting.html
|
|
|
public static function privacySetting($merchant, $isOpen = 0)
|
|
|
@@ -1636,7 +1655,8 @@ class wxUtil
|
|
|
$result = $curl->setOption(CURLOPT_POSTFIELDS, Json::encode($data))->post($url);
|
|
|
$respond = Json::decode($result);
|
|
|
echo "<pre>";
|
|
|
- print_r($respond);echo '隐私设置OK';
|
|
|
+ print_r($respond);
|
|
|
+ echo '隐私设置OK';
|
|
|
}
|
|
|
|
|
|
//收款小程序码
|