抖音小店对接
//通用接口调用
private function APi($method,$m,$shopid):string{
$accessToken = $this->getDYAccessToken($shopid);
$timestamp = time();
// 序列化参数
$paramJson = $this->marshal($m);
// 计算签名
$signVal = $this->sign($this->appKey, $this->appSecret, $method, $timestamp, $paramJson);
// 发起请求
$res = $this->fetchdy($this->appKey, $this->host, $method,
$timestamp, $paramJson, $accessToken, $signVal);
return $res;
}
-接口调用通用方法-php