浏览代码

删除淘宝SDK,未发现项目中有使用痕迹

sunxbiao 9 月之前
父节点
当前提交
9c737cb75e
共有 100 个文件被更改,包括 0 次插入10037 次删除
  1. 0 77
      extend/taobaosdk/Autoloader.php
  2. 0 12
      extend/taobaosdk/OapiTest.php
  3. 0 384
      extend/taobaosdk/QimenCloud/QimenCloudClient.php
  4. 0 40
      extend/taobaosdk/TopSdk.php
  5. 0 255
      extend/taobaosdk/aliyun/AliyunClient.php
  6. 0 653
      extend/taobaosdk/dingtalk/DingTalkClient.php
  7. 0 18
      extend/taobaosdk/dingtalk/DingTalkConstant.php
  8. 0 47
      extend/taobaosdk/top/ApplicationVar.php
  9. 0 199
      extend/taobaosdk/top/ClusterTopClient.php
  10. 0 23
      extend/taobaosdk/top/HttpdnsGetRequest.php
  11. 0 107
      extend/taobaosdk/top/RequestCheckUtil.php
  12. 0 21
      extend/taobaosdk/top/ResultSet.php
  13. 0 219
      extend/taobaosdk/top/SpiUtils.php
  14. 0 377
      extend/taobaosdk/top/TopClient.php
  15. 0 43
      extend/taobaosdk/top/TopLogger.php
  16. 0 35
      extend/taobaosdk/top/domain/Area.php
  17. 0 15
      extend/taobaosdk/top/domain/Data.php
  18. 0 15
      extend/taobaosdk/top/domain/Extend.php
  19. 0 20
      extend/taobaosdk/top/domain/FavoritesDetail.php
  20. 0 20
      extend/taobaosdk/top/domain/FavoritesInfo.php
  21. 0 20
      extend/taobaosdk/top/domain/Feature.php
  22. 0 560
      extend/taobaosdk/top/domain/Item.php
  23. 0 30
      extend/taobaosdk/top/domain/ItemImg.php
  24. 0 110
      extend/taobaosdk/top/domain/Items.php
  25. 0 29
      extend/taobaosdk/top/domain/KfcSearchResult.php
  26. 0 40
      extend/taobaosdk/top/domain/Location.php
  27. 0 15
      extend/taobaosdk/top/domain/MapData.php
  28. 0 210
      extend/taobaosdk/top/domain/NTbkItem.php
  29. 0 45
      extend/taobaosdk/top/domain/NTbkShop.php
  30. 0 170
      extend/taobaosdk/top/domain/OpenAccount.php
  31. 0 30
      extend/taobaosdk/top/domain/OpenAccountResult.php
  32. 0 30
      extend/taobaosdk/top/domain/OpenAccountSearchResult.php
  33. 0 30
      extend/taobaosdk/top/domain/OpenAccountTokenApplyResult.php
  34. 0 30
      extend/taobaosdk/top/domain/OpenAccountTokenValidateResult.php
  35. 0 30
      extend/taobaosdk/top/domain/OpenaccountLong.php
  36. 0 30
      extend/taobaosdk/top/domain/OpenaccountObject.php
  37. 0 25
      extend/taobaosdk/top/domain/OpenaccountVoid.php
  38. 0 30
      extend/taobaosdk/top/domain/OrderData.php
  39. 0 60
      extend/taobaosdk/top/domain/PaginationResult.php
  40. 0 200
      extend/taobaosdk/top/domain/Product.php
  41. 0 30
      extend/taobaosdk/top/domain/ProductExtraInfo.php
  42. 0 40
      extend/taobaosdk/top/domain/ProductImg.php
  43. 0 45
      extend/taobaosdk/top/domain/ProductPropImg.php
  44. 0 25
      extend/taobaosdk/top/domain/PromotionExtend.php
  45. 0 30
      extend/taobaosdk/top/domain/PromotionList.php
  46. 0 35
      extend/taobaosdk/top/domain/PropImg.php
  47. 0 70
      extend/taobaosdk/top/domain/PropValue.php
  48. 0 20
      extend/taobaosdk/top/domain/RecommendItemList.php
  49. 0 50
      extend/taobaosdk/top/domain/RegisterInfoDto.php
  50. 0 30
      extend/taobaosdk/top/domain/Result.php
  51. 0 15
      extend/taobaosdk/top/domain/Results.php
  52. 0 30
      extend/taobaosdk/top/domain/RightsInstanceCreateResult.php
  53. 0 125
      extend/taobaosdk/top/domain/Shipping.php
  54. 0 120
      extend/taobaosdk/top/domain/Sku.php
  55. 0 70
      extend/taobaosdk/top/domain/TljInstanceReportDto.php
  56. 0 40
      extend/taobaosdk/top/domain/TokenInfo.php
  57. 0 20
      extend/taobaosdk/top/domain/TokenInfoExt.php
  58. 0 25
      extend/taobaosdk/top/domain/TopDownloadRecordDo.php
  59. 0 45
      extend/taobaosdk/top/domain/TopItemQuery.php
  60. 0 15
      extend/taobaosdk/top/domain/Trackparams.php
  61. 0 25
      extend/taobaosdk/top/domain/TradeConfirmFee.php
  62. 0 55
      extend/taobaosdk/top/domain/UploadTokenRequestV.php
  63. 0 45
      extend/taobaosdk/top/domain/Video.php
  64. 0 20
      extend/taobaosdk/top/domain/WordMapData.php
  65. 0 20
      extend/taobaosdk/top/domain/Youjiacouponinfo.php
  66. 0 26
      extend/taobaosdk/top/fileTest.php
  67. 0 32
      extend/taobaosdk/top/request/AppipGetRequest.php
  68. 0 48
      extend/taobaosdk/top/request/AreasGetRequest.php
  69. 0 47
      extend/taobaosdk/top/request/BaichuanOpenaccountLoginRequest.php
  70. 0 47
      extend/taobaosdk/top/request/BaichuanOpenaccountLoginbytokenRequest.php
  71. 0 47
      extend/taobaosdk/top/request/BaichuanOpenaccountLogindoublecheckRequest.php
  72. 0 47
      extend/taobaosdk/top/request/BaichuanOpenaccountNewlogindoublecheckRequest.php
  73. 0 47
      extend/taobaosdk/top/request/BaichuanOpenaccountPasswordResetRequest.php
  74. 0 47
      extend/taobaosdk/top/request/BaichuanOpenaccountRegisterRequest.php
  75. 0 47
      extend/taobaosdk/top/request/BaichuanOpenaccountRegistercodeCheckRequest.php
  76. 0 47
      extend/taobaosdk/top/request/BaichuanOpenaccountRegistercodeSendRequest.php
  77. 0 47
      extend/taobaosdk/top/request/BaichuanOpenaccountResetcodeCheckRequest.php
  78. 0 47
      extend/taobaosdk/top/request/BaichuanOpenaccountResetcodeSendRequest.php
  79. 0 47
      extend/taobaosdk/top/request/BaichuanOrderurlGetRequest.php
  80. 0 47
      extend/taobaosdk/top/request/BaichuanPayresultQueryRequest.php
  81. 0 47
      extend/taobaosdk/top/request/BaichuanTaokeTraceRequest.php
  82. 0 47
      extend/taobaosdk/top/request/BaichuanUserLoginRequest.php
  83. 0 47
      extend/taobaosdk/top/request/BaichuanUserLoginbytokenRequest.php
  84. 0 47
      extend/taobaosdk/top/request/BaichuanUserLogindoublecheckRequest.php
  85. 0 82
      extend/taobaosdk/top/request/CloudpushMessageAndroidRequest.php
  86. 0 82
      extend/taobaosdk/top/request/CloudpushMessageIosRequest.php
  87. 0 99
      extend/taobaosdk/top/request/CloudpushNoticeAndroidRequest.php
  88. 0 115
      extend/taobaosdk/top/request/CloudpushNoticeIosRequest.php
  89. 0 374
      extend/taobaosdk/top/request/CloudpushPushRequest.php
  90. 0 320
      extend/taobaosdk/top/request/DeliverySendRequest.php
  91. 0 81
      extend/taobaosdk/top/request/FilesGetRequest.php
  92. 0 32
      extend/taobaosdk/top/request/HttpdnsGetRequest.php
  93. 0 2073
      extend/taobaosdk/top/request/ItemAddRequest.php
  94. 0 83
      extend/taobaosdk/top/request/ItemImgDeleteRequest.php
  95. 0 129
      extend/taobaosdk/top/request/ItemImgUploadRequest.php
  96. 0 130
      extend/taobaosdk/top/request/ItemJointImgRequest.php
  97. 0 115
      extend/taobaosdk/top/request/ItemJointPropimgRequest.php
  98. 0 66
      extend/taobaosdk/top/request/ItemSkusGetRequest.php
  99. 0 49
      extend/taobaosdk/top/request/ItemUpdateDelistingRequest.php
  100. 0 0
      extend/taobaosdk/top/request/ItemUpdateListingRequest.php

+ 0 - 77
extend/taobaosdk/Autoloader.php

@@ -1,77 +0,0 @@
1
-<?php
2
-class Autoloader{
3
-  
4
-  /**
5
-     * 类库自动加载,写死路径,确保不加载其他文件。
6
-     * @param string $class 对象类名
7
-     * @return void
8
-     */
9
-    public static function autoload($class) {
10
-        $name = $class;
11
-        if(false !== strpos($name,'\\')){
12
-          $name = strstr($class, '\\', true);
13
-        }
14
-        
15
-        $filename = TOP_AUTOLOADER_PATH."/top/".$name.".php";
16
-        if(is_file($filename)) {
17
-            include $filename;
18
-            return;
19
-        }
20
-
21
-        $filename = TOP_AUTOLOADER_PATH."/top/request/".$name.".php";
22
-        if(is_file($filename)) {
23
-            include $filename;
24
-            return;
25
-        }
26
-
27
-        $filename = TOP_AUTOLOADER_PATH."/top/domain/".$name.".php";
28
-        if(is_file($filename)) {
29
-            include $filename;
30
-            return;
31
-        }
32
-
33
-        $filename = TOP_AUTOLOADER_PATH."/aliyun/".$name.".php";
34
-        if(is_file($filename)) {
35
-            include $filename;
36
-            return;
37
-        }
38
-
39
-        $filename = TOP_AUTOLOADER_PATH."/aliyun/request/".$name.".php";
40
-        if(is_file($filename)) {
41
-            include $filename;
42
-            return;
43
-        }
44
-
45
-        $filename = TOP_AUTOLOADER_PATH."/aliyun/domain/".$name.".php";
46
-        if(is_file($filename)) {
47
-            include $filename;
48
-            return;
49
-        }      
50
-
51
-        $filename = TOP_AUTOLOADER_PATH."/dingtalk/".$name.".php";
52
-        if(is_file($filename)) {
53
-            include $filename;
54
-            return;
55
-        }
56
-        $filename = TOP_AUTOLOADER_PATH."/dingtalk/request/".$name.".php";
57
-        if(is_file($filename)) {
58
-            include $filename;
59
-            return;
60
-        }
61
-
62
-        $filename = TOP_AUTOLOADER_PATH."/dingtalk/domain/".$name.".php";
63
-        if(is_file($filename)) {
64
-            include $filename;
65
-            return;
66
-        }         
67
-		
68
-		$filename = TOP_AUTOLOADER_PATH."/QimenCloud/".$name.".php";
69
-        if(is_file($filename)) {
70
-            include $filename;
71
-            return;
72
-        }
73
-    }
74
-}
75
-
76
-spl_autoload_register('Autoloader::autoload');
77
-?>

+ 0 - 12
extend/taobaosdk/OapiTest.php

@@ -1,12 +0,0 @@
1
-<?php
2
-include "TopSdk.php";
3
-date_default_timezone_set('Asia/Shanghai');
4
-
5
-$c = new DingTalkClient(DingTalkConstant::$CALL_TYPE_OAPI, DingTalkConstant::$METHOD_POST , DingTalkConstant::$FORMAT_JSON);
6
-$req = new OapiMediaUploadRequest;
7
-$req->setType("image");
8
-$req->setMedia(array('type'=>'application/octet-stream','filename'=>'image.png', 'content' => file_get_contents('/Users/test/image.png')));
9
-$resp=$c->execute($req, "******","https://oapi.dingtalk.com/media/upload");
10
-var_dump($resp)
11
-
12
-?>

+ 0 - 384
extend/taobaosdk/QimenCloud/QimenCloudClient.php

@@ -1,384 +0,0 @@
1
-<?php
2
-class QimenCloudClient
3
-{
4
-	public $appkey;
5
-
6
-	public $secretKey;
7
-	
8
-	public $targetAppkey = "";
9
-
10
-	public $gatewayUrl = null;
11
-
12
-	public $format = "xml";
13
-
14
-	public $connectTimeout;
15
-
16
-	public $readTimeout;
17
-
18
-	/** 是否打开入参check**/
19
-	public $checkRequest = true;
20
-
21
-	protected $signMethod = "md5";
22
-
23
-	protected $apiVersion = "2.0";
24
-
25
-	protected $sdkVersion = "top-sdk-php-20151012";
26
-
27
-	public function getAppkey()
28
-	{
29
-		return $this->appkey;
30
-	}
31
-
32
-	public function __construct($appkey = "",$secretKey = ""){
33
-		$this->appkey = $appkey;
34
-		$this->secretKey = $secretKey ;
35
-	}
36
-
37
-	protected function generateSign($params)
38
-	{
39
-		ksort($params);
40
-
41
-		$stringToBeSigned = $this->secretKey;
42
-		foreach ($params as $k => $v)
43
-		{
44
-			if(!is_array($v) && "@" != substr($v, 0, 1))
45
-			{
46
-				$stringToBeSigned .= "$k$v";
47
-			}
48
-		}
49
-		unset($k, $v);
50
-		$stringToBeSigned .= $this->secretKey;
51
-
52
-		return strtoupper(md5($stringToBeSigned));
53
-	}
54
-
55
-	public function curl($url, $postFields = null)
56
-	{
57
-		$ch = curl_init();
58
-		curl_setopt($ch, CURLOPT_URL, $url);
59
-		curl_setopt($ch, CURLOPT_FAILONERROR, false);
60
-		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
61
-		if ($this->readTimeout) {
62
-			curl_setopt($ch, CURLOPT_TIMEOUT, $this->readTimeout);
63
-		}
64
-		if ($this->connectTimeout) {
65
-			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);
66
-		}
67
-		curl_setopt ( $ch, CURLOPT_USERAGENT, "top-sdk-php" );
68
-		//https 请求
69
-		if(strlen($url) > 5 && strtolower(substr($url,0,5)) == "https" ) {
70
-			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
71
-			curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
72
-		}
73
-
74
-		if (is_array($postFields) && 0 < count($postFields))
75
-		{
76
-			$postBodyString = "";
77
-			$postMultipart = false;
78
-			foreach ($postFields as $k => $v)
79
-			{
80
-				if("@" != substr($v, 0, 1))//判断是不是文件上传
81
-				{
82
-					$postBodyString .= "$k=" . urlencode($v) . "&"; 
83
-				}
84
-				else//文件上传用multipart/form-data,否则用www-form-urlencoded
85
-				{
86
-					$postMultipart = true;
87
-					if(class_exists('\CURLFile')){
88
-						$postFields[$k] = new \CURLFile(substr($v, 1));
89
-					}
90
-				}
91
-			}
92
-			unset($k, $v);
93
-			curl_setopt($ch, CURLOPT_POST, true);
94
-			if ($postMultipart)
95
-			{
96
-				if (class_exists('\CURLFile')) {
97
-				    curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true);
98
-				} else {
99
-				    if (defined('CURLOPT_SAFE_UPLOAD')) {
100
-				        curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);
101
-				    }
102
-				}
103
-				curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
104
-			}
105
-			else
106
-			{
107
-				$header = array("content-type: application/x-www-form-urlencoded; charset=UTF-8");
108
-				curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
109
-				curl_setopt($ch, CURLOPT_POSTFIELDS, substr($postBodyString,0,-1));
110
-			}
111
-		}
112
-		$reponse = curl_exec($ch);
113
-		
114
-		if (curl_errno($ch))
115
-		{
116
-			throw new Exception(curl_error($ch),0);
117
-		}
118
-		else
119
-		{
120
-			$httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
121
-			if (200 !== $httpStatusCode)
122
-			{
123
-				throw new Exception($reponse,$httpStatusCode);
124
-			}
125
-		}
126
-		curl_close($ch);
127
-		return $reponse;
128
-	}
129
-	public function curl_with_memory_file($url, $postFields = null, $fileFields = null)
130
-	{
131
-		$ch = curl_init();
132
-		curl_setopt($ch, CURLOPT_URL, $url);
133
-		curl_setopt($ch, CURLOPT_FAILONERROR, false);
134
-		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
135
-		if ($this->readTimeout) {
136
-			curl_setopt($ch, CURLOPT_TIMEOUT, $this->readTimeout);
137
-		}
138
-		if ($this->connectTimeout) {
139
-			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);
140
-		}
141
-		curl_setopt ( $ch, CURLOPT_USERAGENT, "top-sdk-php" );
142
-		//https 请求
143
-		if(strlen($url) > 5 && strtolower(substr($url,0,5)) == "https" ) {
144
-			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
145
-			curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
146
-		}
147
-		//生成分隔符
148
-		$delimiter = '-------------' . uniqid();
149
-		//先将post的普通数据生成主体字符串
150
-		$data = '';
151
-		if($postFields != null){
152
-			foreach ($postFields as $name => $content) {
153
-			    $data .= "--" . $delimiter . "\r\n";
154
-			    $data .= 'Content-Disposition: form-data; name="' . $name . '"';
155
-			    //multipart/form-data 不需要urlencode,参见 http:stackoverflow.com/questions/6603928/should-i-url-encode-post-data
156
-			    $data .= "\r\n\r\n" . $content . "\r\n";
157
-			}
158
-			unset($name,$content);
159
-		}
160
-
161
-		//将上传的文件生成主体字符串
162
-		if($fileFields != null){
163
-			foreach ($fileFields as $name => $file) {
164
-			    $data .= "--" . $delimiter . "\r\n";
165
-			    $data .= 'Content-Disposition: form-data; name="' . $name . '"; filename="' . $file['name'] . "\" \r\n";
166
-			    $data .= 'Content-Type: ' . $file['type'] . "\r\n\r\n";//多了个文档类型
167
-
168
-			    $data .= $file['content'] . "\r\n";
169
-			}
170
-			unset($name,$file);
171
-		}
172
-		//主体结束的分隔符
173
-		$data .= "--" . $delimiter . "--";
174
-
175
-		curl_setopt($ch, CURLOPT_POST, true);
176
-		curl_setopt($ch, CURLOPT_HTTPHEADER , array(
177
-		    'Content-Type: multipart/form-data; boundary=' . $delimiter,
178
-		    'Content-Length: ' . strlen($data))
179
-		); 
180
-		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
181
-		curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
182
-
183
-		$reponse = curl_exec($ch);
184
-		unset($data);
185
-
186
-		if (curl_errno($ch))
187
-		{
188
-			throw new Exception(curl_error($ch),0);
189
-		}
190
-		else
191
-		{
192
-			$httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
193
-			if (200 !== $httpStatusCode)
194
-			{
195
-				throw new Exception($reponse,$httpStatusCode);
196
-			}
197
-		}
198
-		curl_close($ch);
199
-		return $reponse;
200
-	}
201
-
202
-	protected function logCommunicationError($apiName, $requestUrl, $errorCode, $responseTxt)
203
-	{
204
-		$localIp = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : "CLI";
205
-		$logger = new TopLogger;
206
-		$logger->conf["log_file"] = rtrim(TOP_SDK_WORK_DIR, '\\/') . '/' . "logs/top_comm_err_" . $this->appkey . "_" . date("Y-m-d") . ".log";
207
-		$logger->conf["separator"] = "^_^";
208
-		$logData = array(
209
-		date("Y-m-d H:i:s"),
210
-		$apiName,
211
-		$this->appkey,
212
-		$localIp,
213
-		PHP_OS,
214
-		$this->sdkVersion,
215
-		$requestUrl,
216
-		$errorCode,
217
-		str_replace("\n","",$responseTxt)
218
-		);
219
-		$logger->log($logData);
220
-	}
221
-
222
-	public function execute($request, $session = null,$bestUrl = null)
223
-	{
224
-		if($this->gatewayUrl == null) {
225
-			throw new Exception("client-check-error:Need Set gatewayUrl.", 40);
226
-		}
227
-
228
-		$result =  new ResultSet(); 
229
-		if($this->checkRequest) {
230
-			try {
231
-				$request->check();
232
-			} catch (Exception $e) {
233
-
234
-				$result->code = $e->getCode();
235
-				$result->msg = $e->getMessage();
236
-				return $result;
237
-			}
238
-		}
239
-		//组装系统参数
240
-		$sysParams["app_key"] = $this->appkey;
241
-		$sysParams["v"] = $this->apiVersion;
242
-		$sysParams["format"] = $this->format;
243
-		$sysParams["sign_method"] = $this->signMethod;
244
-		$sysParams["method"] = $request->getApiMethodName();
245
-		$sysParams["timestamp"] = date("Y-m-d H:i:s");
246
-		$sysParams["target_app_key"] = $this->targetAppkey;
247
-		if (null != $session)
248
-		{
249
-			$sysParams["session"] = $session;
250
-		}
251
-		$apiParams = array();
252
-		//获取业务参数
253
-		$apiParams = $request->getApiParas();
254
-
255
-
256
-		//系统参数放入GET请求串
257
-		if($bestUrl){
258
-			$requestUrl = $bestUrl."?";
259
-			$sysParams["partner_id"] = $this->getClusterTag();
260
-		}else{
261
-			$requestUrl = $this->gatewayUrl."?";
262
-			$sysParams["partner_id"] = $this->sdkVersion;
263
-		}
264
-		//签名
265
-		$sysParams["sign"] = $this->generateSign(array_merge($apiParams, $sysParams));
266
-
267
-		foreach ($sysParams as $sysParamKey => $sysParamValue)
268
-		{
269
-			// if(strcmp($sysParamKey,"timestamp") != 0)
270
-			$requestUrl .= "$sysParamKey=" . urlencode($sysParamValue) . "&";
271
-		}
272
-
273
-		$fileFields = array();
274
-		foreach ($apiParams as $key => $value) {
275
-			if(is_array($value) && array_key_exists('type',$value) && array_key_exists('content',$value) ){
276
-				$value['name'] = $key;
277
-				$fileFields[$key] = $value;
278
-				unset($apiParams[$key]);
279
-			}
280
-		}
281
-
282
-		// $requestUrl .= "timestamp=" . urlencode($sysParams["timestamp"]) . "&";
283
-		$requestUrl = substr($requestUrl, 0, -1);
284
-
285
-		//发起HTTP请求
286
-		try
287
-		{
288
-			if(count($fileFields) > 0){
289
-				$resp = $this->curl_with_memory_file($requestUrl, $apiParams, $fileFields);
290
-			}else{
291
-				$resp = $this->curl($requestUrl, $apiParams);
292
-			}
293
-		}
294
-		catch (Exception $e)
295
-		{
296
-			$this->logCommunicationError($sysParams["method"],$requestUrl,"HTTP_ERROR_" . $e->getCode(),$e->getMessage());
297
-			$result->code = $e->getCode();
298
-			$result->msg = $e->getMessage();
299
-			return $result;
300
-		}
301
-
302
-		unset($apiParams);
303
-		unset($fileFields);
304
-		//解析TOP返回结果
305
-		$respWellFormed = false;
306
-		if ("json" == $this->format)
307
-		{
308
-			$respObject = json_decode($resp);
309
-			if (null !== $respObject)
310
-			{
311
-				$respWellFormed = true;
312
-				foreach ($respObject as $propKey => $propValue)
313
-				{
314
-					$respObject = $propValue;
315
-				}
316
-			}
317
-		}
318
-		else if("xml" == $this->format)
319
-		{
320
-			$respObject = @simplexml_load_string($resp);
321
-			if (false !== $respObject)
322
-			{
323
-				$respWellFormed = true;
324
-			}
325
-		}
326
-
327
-		//返回的HTTP文本不是标准JSON或者XML,记下错误日志
328
-		if (false === $respWellFormed)
329
-		{
330
-			$this->logCommunicationError($sysParams["method"],$requestUrl,"HTTP_RESPONSE_NOT_WELL_FORMED",$resp);
331
-			$result->code = 0;
332
-			$result->msg = "HTTP_RESPONSE_NOT_WELL_FORMED";
333
-			return $result;
334
-		}
335
-
336
-		//如果TOP返回了错误码,记录到业务错误日志中
337
-		if (isset($respObject->code))
338
-		{
339
-			$logger = new TopLogger;
340
-			$logger->conf["log_file"] = rtrim(TOP_SDK_WORK_DIR, '\\/') . '/' . "logs/top_biz_err_" . $this->appkey . "_" . date("Y-m-d") . ".log";
341
-			$logger->log(array(
342
-				date("Y-m-d H:i:s"),
343
-				$resp
344
-			));
345
-		}
346
-		return $respObject;
347
-	}
348
-
349
-	public function exec($paramsArray)
350
-	{
351
-		if (!isset($paramsArray["method"]))
352
-		{
353
-			trigger_error("No api name passed");
354
-		}
355
-		$inflector = new LtInflector;
356
-		$inflector->conf["separator"] = ".";
357
-		$requestClassName = ucfirst($inflector->camelize(substr($paramsArray["method"], 7))) . "Request";
358
-		if (!class_exists($requestClassName))
359
-		{
360
-			trigger_error("No such api: " . $paramsArray["method"]);
361
-		}
362
-
363
-		$session = isset($paramsArray["session"]) ? $paramsArray["session"] : null;
364
-
365
-		$req = new $requestClassName;
366
-		foreach($paramsArray as $paraKey => $paraValue)
367
-		{
368
-			$inflector->conf["separator"] = "_";
369
-			$setterMethodName = $inflector->camelize($paraKey);
370
-			$inflector->conf["separator"] = ".";
371
-			$setterMethodName = "set" . $inflector->camelize($setterMethodName);
372
-			if (method_exists($req, $setterMethodName))
373
-			{
374
-				$req->$setterMethodName($paraValue);
375
-			}
376
-		}
377
-		return $this->execute($req, $session);
378
-	}
379
-
380
-	private function getClusterTag()
381
-    {
382
-	    return substr($this->sdkVersion,0,11)."-cluster".substr($this->sdkVersion,11);
383
-    }
384
-}

+ 0 - 40
extend/taobaosdk/TopSdk.php

@@ -1,40 +0,0 @@
1
-<?php
2
-/**
3
- * TOP SDK 入口文件
4
- * 请不要修改这个文件,除非你知道怎样修改以及怎样恢复
5
- * @author xuteng.xt
6
- */
7
-
8
-/**
9
- * 定义常量开始
10
- * 在include("TopSdk.php")之前定义这些常量,不要直接修改本文件,以利于升级覆盖
11
- */
12
-/**
13
- * SDK工作目录
14
- * 存放日志,TOP缓存数据
15
- */
16
-if (!defined("TOP_SDK_WORK_DIR"))
17
-{
18
-	define("TOP_SDK_WORK_DIR", "/tmp/");
19
-}
20
-
21
-/**
22
- * 是否处于开发模式
23
- * 在你自己电脑上开发程序的时候千万不要设为false,以免缓存造成你的代码修改了不生效
24
- * 部署到生产环境正式运营后,如果性能压力大,可以把此常量设定为false,能提高运行速度(对应的代价就是你下次升级程序时要清一下缓存)
25
- */
26
-if (!defined("TOP_SDK_DEV_MODE"))
27
-{
28
-	define("TOP_SDK_DEV_MODE", true);
29
-}
30
-
31
-if (!defined("TOP_AUTOLOADER_PATH"))
32
-{
33
-	define("TOP_AUTOLOADER_PATH", dirname(__FILE__));
34
-}
35
-
36
-/**
37
-* 注册autoLoader,此注册autoLoader只加载top文件
38
-* 不要删除,除非你自己加载文件。
39
-**/
40
-require("Autoloader.php");

+ 0 - 255
extend/taobaosdk/aliyun/AliyunClient.php

@@ -1,255 +0,0 @@
1
-<?php
2
-class AliyunClient
3
-{
4
-	public $accessKeyId;
5
-
6
-	public $accessKeySecret;
7
-
8
-	public $serverUrl = "http://ecs.aliyuncs.com/";
9
-
10
-	public $format = "json";
11
-
12
-	public $connectTimeout = 3000;//3秒
13
-
14
-	public $readTimeout = 80000;//80秒
15
-
16
-	/** 是否打开入参check**/
17
-	public $checkRequest = true;
18
-
19
-	protected $signatureMethod = "HMAC-SHA1";
20
-
21
-	protected $signatureVersion = "1.0";
22
-	
23
-    protected  $dateTimeFormat = 'Y-m-d\TH:i:s\Z'; // ISO8601规范
24
-	
25
-	protected $sdkVersion = "1.0";
26
-
27
-	public function execute($request)
28
-	{
29
-		if($this->checkRequest) {
30
-			try {
31
-				$request->check();
32
-			} catch (Exception $e) {
33
-				$result->code = $e->getCode();
34
-				$result->message = $e->getMessage();
35
-				return $result;
36
-			}
37
-		}
38
-		//获取业务参数
39
-		$apiParams = $request->getApiParas();
40
-		//组装系统参数
41
-		$apiParams["AccessKeyId"] = $this->accessKeyId;
42
-		$apiParams["Format"] = $this->format;//
43
-		$apiParams["SignatureMethod"] = $this->signatureMethod;
44
-		$apiParams["SignatureVersion"] = $this->signatureVersion;
45
-		$apiParams["SignatureNonce"] = uniqid();
46
-		date_default_timezone_set("GMT");
47
-		$apiParams["TimeStamp"] = date($this->dateTimeFormat);
48
-		$apiParams["partner_id"] = $this->sdkVersion;
49
-		
50
-	    $apiNameArray =	split("\.", $request->getApiMethodName());
51
-		$apiParams["Action"] = $apiNameArray[3];
52
-		$apiParams["Version"] = $apiNameArray[4];
53
-		//签名
54
-		$apiParams["Signature"] = $this->computeSignature($apiParams, $this->accessKeySecret);
55
-
56
-		//系统参数放入GET请求串
57
-		$requestUrl = rtrim($this->serverUrl,"/") . "/?";
58
-		foreach ($apiParams as $apiParamKey => $apiParamValue)
59
-		{
60
-			$requestUrl .= "$apiParamKey=" . urlencode($apiParamValue) . "&";
61
-		}
62
-		$requestUrl = substr($requestUrl, 0, -1);
63
-		//发起HTTP请求
64
-		try
65
-		{
66
-			$resp = $this->curl($requestUrl, null);
67
-		}
68
-		catch (Exception $e)
69
-		{
70
-			$this->logCommunicationError($apiParams["Action"],$requestUrl,"HTTP_ERROR_" . $e->getCode(),$e->getMessage());
71
-			if ("json" == $this->format)
72
-			{
73
-				return  json_decode($e->getMessage());
74
-			}
75
-			else if("xml" == $this->format)
76
-			{
77
-				return  @simplexml_load_string($e->getMessage());
78
-			}
79
-	    }
80
-
81
-		//解析API返回结果
82
-		$respWellFormed = false;
83
-		if ("json" == $this->format)
84
-		{
85
-			$respObject = json_decode($resp);
86
-			if (null !== $respObject)
87
-			{
88
-				$respWellFormed = true;
89
-			}
90
-		}
91
-		else if("xml" == $this->format)
92
-		{
93
-			$respObject = @simplexml_load_string($resp);
94
-			if (false !== $respObject)
95
-			{
96
-				$respWellFormed = true;
97
-			}
98
-		}
99
-
100
-		//返回的HTTP文本不是标准JSON或者XML,记下错误日志
101
-		if (false === $respWellFormed)
102
-		{
103
-			$this->logCommunicationError($apiParams["Action"],$requestUrl,"HTTP_RESPONSE_NOT_WELL_FORMED",$resp);
104
-			$result->code = 0;
105
-			$result->message = "HTTP_RESPONSE_NOT_WELL_FORMED";
106
-			return $result;
107
-		}
108
-
109
-		//如果TOP返回了错误码,记录到业务错误日志中
110
-		if (isset($respObject->code))
111
-		{
112
-			$logger = new LtLogger;
113
-			$logger->conf["log_file"] = rtrim(TOP_SDK_WORK_DIR, '\\/') . '/' . "logs/top_biz_err_" . $this->appkey . "_" . date("Y-m-d") . ".log";
114
-			$logger->log(array(
115
-				date("Y-m-d H:i:s"),
116
-				$resp
117
-			));
118
-		}
119
-		return $respObject;
120
-	}
121
-
122
-	public function exec($paramsArray)
123
-	{
124
-		if (!isset($paramsArray["Action"]))
125
-		{
126
-			trigger_error("No api name passed");
127
-		}
128
-		$inflector = new LtInflector;
129
-		$inflector->conf["separator"] = ".";
130
-		$requestClassName = ucfirst($inflector->camelize(substr($paramsArray["Action"], 7))) . "Request";
131
-		if (!class_exists($requestClassName))
132
-		{
133
-			trigger_error("No such api: " . $paramsArray["Action"]);
134
-		}
135
-
136
-		$req = new $requestClassName;
137
-		foreach($paramsArray as $paraKey => $paraValue)
138
-		{
139
-			$inflector->conf["separator"] = "_";
140
-			$setterMethodName = $inflector->camelize($paraKey);
141
-			$inflector->conf["separator"] = ".";
142
-			$setterMethodName = "set" . $inflector->camelize($setterMethodName);
143
-			if (method_exists($req, $setterMethodName))
144
-			{
145
-				$req->$setterMethodName($paraValue);
146
-			}
147
-		}
148
-		return $this->execute($req, $session);
149
-	}
150
-	
151
-	protected function percentEncode($str)
152
-	{
153
-	    // 使用urlencode编码后,将"+","*","%7E"做替换即满足 API规定的编码规范
154
-	    $res = urlencode($str);
155
-	    $res = preg_replace('/\+/', '%20', $res);
156
-	    $res = preg_replace('/\*/', '%2A', $res);
157
-	    $res = preg_replace('/%7E/', '~', $res);
158
-	    return $res;
159
-	}
160
-	
161
-	protected function computeSignature($parameters, $accessKeySecret)
162
-	{
163
-	    // 将参数Key按字典顺序排序
164
-	    ksort($parameters);
165
-	
166
-	    // 生成规范化请求字符串
167
-	    $canonicalizedQueryString = '';
168
-	    foreach($parameters as $key => $value)
169
-	    {
170
-		$canonicalizedQueryString .= '&' . $this->percentEncode($key) 
171
-		    . '=' . $this->percentEncode($value);
172
-	    }
173
-	
174
-	    // 生成用于计算签名的字符串 stringToSign
175
-	    $stringToSign = 'GET&%2F&' . $this->percentencode(substr($canonicalizedQueryString, 1));
176
-	
177
-	    // 计算签名,注意accessKeySecret后面要加上字符'&'
178
-	    $signature = base64_encode(hash_hmac('sha1', $stringToSign, $accessKeySecret . '&', true));
179
-	    return $signature;
180
-	}
181
-	
182
-    public function curl($url, $postFields = null)
183
-	{
184
-		$ch = curl_init();
185
-		curl_setopt($ch, CURLOPT_URL, $url);
186
-		curl_setopt($ch, CURLOPT_FAILONERROR, false);
187
-		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
188
-		if ($this->readTimeout) {
189
-			curl_setopt($ch, CURLOPT_TIMEOUT, $this->readTimeout);
190
-		}
191
-		if ($this->connectTimeout) {
192
-			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);
193
-		}
194
-		//https 请求
195
-		if(strlen($url) > 5 && strtolower(substr($url,0,5)) == "https" ) {
196
-			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
197
-			curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
198
-		}
199
-
200
-		if (is_array($postFields) && 0 < count($postFields))
201
-		{
202
-			$postBodyString = "";
203
-			$postMultipart = false;
204
-			foreach ($postFields as $k => $v)
205
-			{
206
-				if("@" != substr($v, 0, 1))//判断是不是文件上传
207
-				{
208
-					$postBodyString .= "$k=" . urlencode($v) . "&"; 
209
-				}
210
-				else//文件上传用multipart/form-data,否则用www-form-urlencoded
211
-				{
212
-					$postMultipart = true;
213
-				}
214
-			}
215
-			unset($k, $v);
216
-			curl_setopt($ch, CURLOPT_POST, true);
217
-			if ($postMultipart)
218
-			{
219
-				curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
220
-			}
221
-			else
222
-			{
223
-				curl_setopt($ch, CURLOPT_POSTFIELDS, substr($postBodyString,0,-1));
224
-			}
225
-		}
226
-		$reponse = curl_exec($ch);
227
-		
228
-		if (curl_errno($ch))
229
-		{
230
-			throw new Exception(curl_error($ch),0);
231
-		}
232
-		curl_close($ch);
233
-		return $reponse;
234
-	}
235
-
236
-	protected function logCommunicationError($apiName, $requestUrl, $errorCode, $responseTxt)
237
-	{
238
-		$localIp = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : "CLI";
239
-		$logger = new LtLogger;
240
-		$logger->conf["log_file"] = rtrim(TOP_SDK_WORK_DIR, '\\/') . '/' . "logs/top_comm_err_" . $this->accessKeyId . "_" . date("Y-m-d") . ".log";
241
-		$logger->conf["separator"] = "^_^";
242
-		$logData = array(
243
-		date("Y-m-d H:i:s"),
244
-		$apiName,
245
-		$this->accessKeyId,
246
-		$localIp,
247
-		PHP_OS,
248
-		$this->sdkVersion,
249
-		$requestUrl,
250
-		$errorCode,
251
-		str_replace("\n","",$responseTxt)
252
-		);
253
-		$logger->log($logData);
254
-	}
255
-}

+ 0 - 653
extend/taobaosdk/dingtalk/DingTalkClient.php

@@ -1,653 +0,0 @@
1
-<?php
2
-class DingTalkClient
3
-{
4
-	/**@Author chaohui.zch copy from TopClient and modify 2016-12-14 **/
5
-
6
-    /**@Author chaohui.zch modify $gatewayUrl 2017-07-18 **/
7
-    public $gatewayUrl = "https://eco.taobao.com/router/rest";
8
-
9
-	public $format = "xml";
10
-
11
-	public $connectTimeout;
12
-
13
-	public $readTimeout;
14
-
15
-    public $apiCallType;
16
-
17
-    public $httpMethod;
18
-
19
-	/** 是否打开入参check**/
20
-	public $checkRequest = true;
21
-
22
-	protected $apiVersion = "2.0";
23
-
24
-	protected $sdkVersion = "dingtalk-sdk-php-20161214";
25
-
26
-    public function __construct($apiCallType = null, $httpMethod = null, $format = "xml"){
27
-        $this->apiCallType = $apiCallType;
28
-        $this->httpMethod = $httpMethod;
29
-        $this->format = $format;
30
-    }
31
-
32
-	public function curl($url, $postFields = null)
33
-	{
34
-		$ch = curl_init();
35
-		curl_setopt($ch, CURLOPT_URL, $url);
36
-		curl_setopt($ch, CURLOPT_FAILONERROR, false);
37
-		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
38
-		if ($this->readTimeout) {
39
-			curl_setopt($ch, CURLOPT_TIMEOUT, $this->readTimeout);
40
-		}
41
-		if ($this->connectTimeout) {
42
-			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);
43
-		}
44
-		curl_setopt ( $ch, CURLOPT_USERAGENT, "dingtalk-sdk-php" );
45
-		//https 请求
46
-		if(strlen($url) > 5 && strtolower(substr($url,0,5)) == "https" ) {
47
-			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
48
-			curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
49
-		}
50
-
51
-		if (is_array($postFields) && 0 < count($postFields))
52
-		{
53
-			$postBodyString = "";
54
-			$postMultipart = false;
55
-			foreach ($postFields as $k => $v)
56
-			{
57
-				if("@" != substr($v, 0, 1))//判断是不是文件上传
58
-				{
59
-					$postBodyString .= "$k=" . urlencode($v) . "&"; 
60
-				}
61
-				else//文件上传用multipart/form-data,否则用www-form-urlencoded
62
-				{
63
-					$postMultipart = true;
64
-					if(class_exists('\CURLFile')){
65
-						$postFields[$k] = new \CURLFile(substr($v, 1));
66
-					}
67
-				}
68
-			}
69
-			unset($k, $v);
70
-			curl_setopt($ch, CURLOPT_POST, true);
71
-			if ($postMultipart)
72
-			{
73
-				if (class_exists('\CURLFile')) {
74
-				    curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true);
75
-				} else {
76
-				    if (defined('CURLOPT_SAFE_UPLOAD')) {
77
-				        curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);
78
-				    }
79
-				}
80
-				curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
81
-			}
82
-			else
83
-			{
84
-				$header = array("content-type: application/x-www-form-urlencoded; charset=UTF-8");
85
-				curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
86
-				curl_setopt($ch, CURLOPT_POSTFIELDS, substr($postBodyString,0,-1));
87
-			}
88
-		}
89
-		$reponse = curl_exec($ch);
90
-		
91
-		if (curl_errno($ch))
92
-		{
93
-			throw new Exception(curl_error($ch),0);
94
-		}
95
-		else
96
-		{
97
-			$httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
98
-			if (200 !== $httpStatusCode)
99
-			{
100
-				throw new Exception($reponse,$httpStatusCode);
101
-			}
102
-		}
103
-		curl_close($ch);
104
-		return $reponse;
105
-	}
106
-
107
-    public function curl_get($url,$apiFields = null)
108
-    {
109
-        $ch = curl_init();
110
-
111
-        foreach ($apiFields as $key => $value)
112
-        {
113
-            $url .= "&" ."$key=" . urlencode($value);
114
-        }
115
-
116
-        curl_setopt($ch, CURLOPT_URL, $url);
117
-        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
118
-        curl_setopt($ch, CURLOPT_FAILONERROR, false);
119
-        curl_setopt($ch, CURLOPT_HEADER, false);
120
-        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
121
-
122
-
123
-        if ($this->readTimeout)
124
-        {
125
-            curl_setopt($ch, CURLOPT_TIMEOUT, $this->readTimeout);
126
-        }
127
-
128
-        if ($this->connectTimeout)
129
-        {
130
-            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);
131
-        }
132
-
133
-        curl_setopt ( $ch, CURLOPT_USERAGENT, "dingtalk-sdk-php" );
134
-
135
-        //https ignore ssl check ?
136
-        if(strlen($url) > 5 && strtolower(substr($url,0,5)) == "https" )
137
-        {
138
-            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
139
-            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
140
-        }
141
-
142
-        $reponse = curl_exec($ch);
143
-
144
-        if (curl_errno($ch))
145
-        {
146
-            throw new Exception(curl_error($ch),0);
147
-        }
148
-        else
149
-        {
150
-            $httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
151
-            if (200 !== $httpStatusCode)
152
-            {
153
-                throw new Exception($reponse,$httpStatusCode);
154
-            }
155
-        }
156
-        curl_close($ch);
157
-        return $reponse;
158
-    }
159
-
160
-    public function curl_json($url, $postFields = null)
161
-    {
162
-        $ch = curl_init();
163
-        curl_setopt($ch, CURLOPT_URL, $url);
164
-        curl_setopt($ch, CURLOPT_FAILONERROR, false);
165
-        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
166
-        if ($this->readTimeout) {
167
-            curl_setopt($ch, CURLOPT_TIMEOUT, $this->readTimeout);
168
-        }
169
-        if ($this->connectTimeout) {
170
-            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);
171
-        }
172
-        curl_setopt ( $ch, CURLOPT_USERAGENT, "dingtalk-sdk-php" );
173
-        //https 请求
174
-        if(strlen($url) > 5 && strtolower(substr($url,0,5)) == "https" ) {
175
-            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
176
-            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
177
-        }
178
-
179
-        if (is_array($postFields) && 0 < count($postFields))
180
-        {
181
-            $postBodyString = "";
182
-            $postMultipart = false;
183
-            foreach ($postFields as $k => $v)
184
-            {
185
-                if(!is_string($v)){
186
-                    $v = json_encode($v);
187
-                }
188
-                if("@" != substr($v, 0, 1))//判断是不是文件上传
189
-                {
190
-                    $postBodyString .= "$k=" . urlencode($v) . "&";
191
-                }
192
-                else//文件上传用multipart/form-data,否则用www-form-urlencoded
193
-                {
194
-                    $postMultipart = true;
195
-                    if(class_exists('\CURLFile')){
196
-                        $postFields[$k] = new \CURLFile(substr($v, 1));
197
-                    }
198
-                }
199
-            }
200
-            unset($k, $v);
201
-            curl_setopt($ch, CURLOPT_POST, true);
202
-            if ($postMultipart)
203
-            {
204
-                if (class_exists('\CURLFile')) {
205
-                    curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true);
206
-                } else {
207
-                    if (defined('CURLOPT_SAFE_UPLOAD')) {
208
-                        curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);
209
-                    }
210
-                }
211
-                curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
212
-            }
213
-            else {
214
-                $header = array("Content-Type: application/json; charset=utf-8", "Content-Length:".strlen(json_encode($postFields)));
215
-                curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
216
-                curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postFields));
217
-            }
218
-        }
219
-        $reponse = curl_exec($ch);
220
-
221
-        if (curl_errno($ch))
222
-        {
223
-            throw new Exception(curl_error($ch),0);
224
-        }
225
-        else
226
-        {
227
-            $httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
228
-            if (200 !== $httpStatusCode)
229
-            {
230
-                throw new Exception($reponse,$httpStatusCode);
231
-            }
232
-        }
233
-        curl_close($ch);
234
-        return $reponse;
235
-    }
236
-
237
-	public function curl_with_memory_file($url, $postFields = null, $fileFields = null)
238
-	{
239
-		$ch = curl_init();
240
-		curl_setopt($ch, CURLOPT_URL, $url);
241
-		curl_setopt($ch, CURLOPT_FAILONERROR, false);
242
-		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
243
-		if ($this->readTimeout) {
244
-			curl_setopt($ch, CURLOPT_TIMEOUT, $this->readTimeout);
245
-		}
246
-		if ($this->connectTimeout) {
247
-			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);
248
-		}
249
-		curl_setopt ( $ch, CURLOPT_USERAGENT, "dingtalk-sdk-php" );
250
-		//https 请求
251
-		if(strlen($url) > 5 && strtolower(substr($url,0,5)) == "https" ) {
252
-			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
253
-			curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
254
-		}
255
-		//生成分隔符
256
-		$delimiter = '-------------' . uniqid();
257
-		//先将post的普通数据生成主体字符串
258
-		$data = '';
259
-		if($postFields != null){
260
-			foreach ($postFields as $name => $content) {
261
-			    $data .= "--" . $delimiter . "\r\n";
262
-			    $data .= 'Content-Disposition: form-data; name="' . $name . '"';
263
-			    //multipart/form-data 不需要urlencode,参见 http:stackoverflow.com/questions/6603928/should-i-url-encode-post-data
264
-			    $data .= "\r\n\r\n" . $content . "\r\n";
265
-			}
266
-			unset($name,$content);
267
-		}
268
-
269
-		//将上传的文件生成主体字符串
270
-		if($fileFields != null){
271
-			foreach ($fileFields as $name => $file) {
272
-			    $data .= "--" . $delimiter . "\r\n";
273
-			    $data .= 'Content-Disposition: form-data; name="' . $name . '"; filename="' . $file['filename'] . "\" \r\n";
274
-			    $data .= 'Content-Type: ' . $file['type'] . "\r\n\r\n";//多了个文档类型
275
-
276
-			    $data .= $file['content'] . "\r\n";
277
-			}
278
-			unset($name,$file);
279
-		}
280
-		//主体结束的分隔符
281
-		$data .= "--" . $delimiter . "--";
282
-
283
-		curl_setopt($ch, CURLOPT_POST, true);
284
-		curl_setopt($ch, CURLOPT_HTTPHEADER , array(
285
-		    'Content-Type: multipart/form-data; boundary=' . $delimiter,
286
-		    'Content-Length: ' . strlen($data))
287
-		); 
288
-		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
289
-		curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
290
-
291
-		$reponse = curl_exec($ch);
292
-		unset($data);
293
-
294
-		if (curl_errno($ch))
295
-		{
296
-			throw new Exception(curl_error($ch),0);
297
-		}
298
-		else
299
-		{
300
-			$httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
301
-			if (200 !== $httpStatusCode)
302
-			{
303
-				throw new Exception($reponse,$httpStatusCode);
304
-			}
305
-		}
306
-		curl_close($ch);
307
-		return $reponse;
308
-	}
309
-
310
-	protected function logCommunicationError($apiName, $requestUrl, $errorCode, $responseTxt)
311
-	{
312
-		$localIp = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : "CLI";
313
-		$logger = new TopLogger;
314
-		$logger->conf["log_file"] = rtrim(TOP_SDK_WORK_DIR, '\\/') . '/' . "logs/top_comm_err_" . "_" . date("Y-m-d") . ".log";
315
-		$logger->conf["separator"] = "^_^";
316
-		$logData = array(
317
-		date("Y-m-d H:i:s"),
318
-		$apiName,
319
-		$localIp,
320
-		PHP_OS,
321
-		$this->sdkVersion,
322
-		$requestUrl,
323
-		$errorCode,
324
-		str_replace("\n","",$responseTxt)
325
-		);
326
-		$logger->log($logData);
327
-	}
328
-
329
-    public function execute($request, $session = null,$bestUrl = null){
330
-        if(DingTalkConstant::$CALL_TYPE_OAPI == $this->apiCallType){
331
-            return $this->_executeOapi($request, $session, $bestUrl, null, null, null, null);
332
-        }else{
333
-            return $this->_execute($request, $session, $bestUrl);
334
-        }
335
-    }
336
-
337
-    public function executeWithAccessKey($request, $bestUrl = null, $accessKey, $accessSecret){
338
-        return $this->executeWithCorpId($request, $bestUrl, $accessKey, $accessSecret, null, null);
339
-    }
340
-
341
-    public function executeWithSuiteTicket($request,$bestUrl = null, $accessKey, $accessSecret, $suiteTicket){
342
-        return $this->executeWithCorpId($request,$bestUrl, $accessKey, $accessSecret, $suiteTicket, null);
343
-    }
344
-
345
-	public function executeWithCorpId($request, $bestUrl = null, $accessKey, $accessSecret, $suiteTicket, $corpId) {
346
-        if(DingTalkConstant::$CALL_TYPE_OAPI == $this->apiCallType){
347
-            return $this->_executeOapi($request, null, $bestUrl,$accessKey, $accessSecret, $suiteTicket, $corpId);
348
-        }else{
349
-            return $this->_execute($request, null, $bestUrl);
350
-        }
351
-    }
352
-
353
-    private function _executeOapi($request, $session = null,$bestUrl = null,$accessKey, $accessSecret, $suiteTicket, $corpId){
354
-        $result =  new ResultSet();
355
-        if($this->checkRequest) {
356
-            try {
357
-                $request->check();
358
-            } catch (Exception $e) {
359
-
360
-                $result->code = $e->getCode();
361
-                $result->msg = $e->getMessage();
362
-                return $result;
363
-            }
364
-        }
365
-
366
-        $sysParams["method"] = $request->getApiMethodName();
367
-        //系统参数放入GET请求串
368
-        if($bestUrl){
369
-            if(strpos($bestUrl,'?') === false){
370
-                $requestUrl = $bestUrl."?";
371
-            }else{
372
-                $requestUrl = $bestUrl;
373
-            }
374
-        }else{
375
-            $requestUrl = $this->gatewayUrl."?";
376
-        }
377
-        if(null != $accessKey){
378
-            $timestamp = $this->getMillisecond();
379
-            // 验证签名有效性
380
-            $canonicalString = $this->getCanonicalStringForIsv($timestamp, $suiteTicket);
381
-            $signature = $this->computeSignature($accessSecret, $canonicalString);
382
-
383
-            $queryParams["accessKey"] = $accessKey;
384
-            $queryParams["signature"] = $signature;
385
-            $queryParams["timestamp"] = $timestamp+"";
386
-            if($suiteTicket != null) {
387
-                $queryParams["suiteTicket"] = $suiteTicket;
388
-            }
389
-            if($corpId != null){
390
-                $queryParams["corpId"] =  $corpId;
391
-            }
392
-            foreach ($queryParams as $queryParamKey => $queryParamValue) {
393
-                $requestUrl .= "$queryParamKey=" . urlencode($queryParamValue) . "&";
394
-            }
395
-        }else{
396
-            $requestUrl .= "access_token=" . urlencode($session) . "&";
397
-        }
398
-
399
-        $apiParams = array();
400
-        //获取业务参数
401
-        $apiParams = $request->getApiParas();
402
-        $fileFields = array();
403
-        foreach ($apiParams as $key => $value) {
404
-            if(is_array($value) && array_key_exists('type',$value) && array_key_exists('content',$value) ){
405
-                $value['name'] = $key;
406
-                $fileFields[$key] = $value;
407
-                unset($apiParams[$key]);
408
-            }
409
-        }
410
-
411
-        // $requestUrl .= "timestamp=" . urlencode($sysParams["timestamp"]) . "&";
412
-        $requestUrl = substr($requestUrl, 0, -1);
413
-
414
-        //发起HTTP请求
415
-        try
416
-        {
417
-            if(count($fileFields) > 0){
418
-                $resp = $this->curl_with_memory_file($requestUrl, $apiParams, $fileFields);
419
-            }else{
420
-                if(DingTalkConstant::$METHOD_POST == $this->httpMethod){
421
-                    $resp = $this->curl_json($requestUrl, $apiParams);
422
-                }else{
423
-                    $resp = $this->curl_get($requestUrl, $apiParams);
424
-                }
425
-            }
426
-        }
427
-        catch (Exception $e)
428
-        {
429
-            $this->logCommunicationError($sysParams["method"],$requestUrl,"HTTP_ERROR_" . $e->getCode(),$e->getMessage());
430
-            $result->code = $e->getCode();
431
-            $result->msg = $e->getMessage();
432
-            return $result;
433
-        }
434
-
435
-        unset($apiParams);
436
-        unset($fileFields);
437
-        //解析TOP返回结果
438
-        $respWellFormed = false;
439
-        if ("json" == $this->format)
440
-        {
441
-            $respObject = json_decode($resp);
442
-            if (null !== $respObject)
443
-            {
444
-                $respWellFormed = true;
445
-            }
446
-        }
447
-        else if("xml" == $this->format)
448
-        {
449
-            $respObject = @simplexml_load_string($resp);
450
-            if (false !== $respObject)
451
-            {
452
-                $respWellFormed = true;
453
-            }
454
-        }
455
-
456
-        //返回的HTTP文本不是标准JSON或者XML,记下错误日志
457
-        if (false === $respWellFormed)
458
-        {
459
-            $this->logCommunicationError($sysParams["method"],$requestUrl,"HTTP_RESPONSE_NOT_WELL_FORMED",$resp);
460
-            $result->code = 0;
461
-            $result->msg = "HTTP_RESPONSE_NOT_WELL_FORMED";
462
-            return $result;
463
-        }
464
-
465
-        //如果TOP返回了错误码,记录到业务错误日志中
466
-        if (isset($respObject->code))
467
-        {
468
-            $logger = new TopLogger;
469
-            $logger->conf["log_file"] = rtrim(TOP_SDK_WORK_DIR, '\\/') . '/' . "logs/top_biz_err_" .  "_" . date("Y-m-d") . ".log";
470
-            $logger->log(array(
471
-                date("Y-m-d H:i:s"),
472
-                $resp
473
-            ));
474
-        }
475
-        return $respObject;
476
-    }
477
-
478
-    private function getMillisecond() {
479
-        list($s1, $s2) = explode(' ', microtime());
480
-        return (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);
481
-    }
482
-
483
-    private function getCanonicalStringForIsv($timestamp, $suiteTicket) {
484
-        $result = $timestamp;
485
-        if($suiteTicket != null) {
486
-            $result .= "\n".$suiteTicket;
487
-        }
488
-        return $result;
489
-    }
490
-
491
-    private function computeSignature($accessSecret, $canonicalString){
492
-        $s = hash_hmac('sha256', $canonicalString, $accessSecret, true);
493
-        return base64_encode($s);
494
-    }
495
-
496
-    private function _execute($request, $session = null,$bestUrl = null)
497
-	{
498
-		$result =  new ResultSet(); 
499
-		if($this->checkRequest) {
500
-			try {
501
-				$request->check();
502
-			} catch (Exception $e) {
503
-
504
-				$result->code = $e->getCode();
505
-				$result->msg = $e->getMessage();
506
-				return $result;
507
-			}
508
-		}
509
-		//组装系统参数
510
-		$sysParams["v"] = $this->apiVersion;
511
-		$sysParams["format"] = $this->format;
512
-		$sysParams["method"] = $request->getApiMethodName();
513
-		$sysParams["timestamp"] = date("Y-m-d H:i:s");
514
-		if (null != $session)
515
-		{
516
-			$sysParams["session"] = $session;
517
-		}
518
-		$apiParams = array();
519
-		//获取业务参数
520
-		$apiParams = $request->getApiParas();
521
-
522
-
523
-		//系统参数放入GET请求串
524
-		if($bestUrl){
525
-            if(strpos($bestUrl,'?') === false){
526
-                $requestUrl = $bestUrl."?";
527
-            }else{
528
-                $requestUrl = $bestUrl;
529
-            }
530
-			$sysParams["partner_id"] = $this->getClusterTag();
531
-		}else{
532
-			$requestUrl = $this->gatewayUrl."?";
533
-			$sysParams["partner_id"] = $this->sdkVersion;
534
-		}
535
-
536
-		foreach ($sysParams as $sysParamKey => $sysParamValue)
537
-		{
538
-			// if(strcmp($sysParamKey,"timestamp") != 0)
539
-			$requestUrl .= "$sysParamKey=" . urlencode($sysParamValue) . "&";
540
-		}
541
-
542
-		$fileFields = array();
543
-		foreach ($apiParams as $key => $value) {
544
-			if(is_array($value) && array_key_exists('type',$value) && array_key_exists('content',$value) ){
545
-				$value['name'] = $key;
546
-				$fileFields[$key] = $value;
547
-				unset($apiParams[$key]);
548
-			}
549
-		}
550
-
551
-		// $requestUrl .= "timestamp=" . urlencode($sysParams["timestamp"]) . "&";
552
-		$requestUrl = substr($requestUrl, 0, -1);
553
-
554
-		//发起HTTP请求
555
-		try
556
-		{
557
-			if(count($fileFields) > 0){
558
-				$resp = $this->curl_with_memory_file($requestUrl, $apiParams, $fileFields);
559
-			}else{
560
-				$resp = $this->curl($requestUrl, $apiParams);
561
-			}
562
-		}
563
-		catch (Exception $e)
564
-		{
565
-			$this->logCommunicationError($sysParams["method"],$requestUrl,"HTTP_ERROR_" . $e->getCode(),$e->getMessage());
566
-			$result->code = $e->getCode();
567
-			$result->msg = $e->getMessage();
568
-			return $result;
569
-		}
570
-
571
-		unset($apiParams);
572
-		unset($fileFields);
573
-		//解析TOP返回结果
574
-		$respWellFormed = false;
575
-		if ("json" == $this->format)
576
-		{
577
-			$respObject = json_decode($resp);
578
-			if (null !== $respObject)
579
-			{
580
-				$respWellFormed = true;
581
-				foreach ($respObject as $propKey => $propValue)
582
-				{
583
-					$respObject = $propValue;
584
-				}
585
-			}
586
-		}
587
-		else if("xml" == $this->format)
588
-		{
589
-			$respObject = @simplexml_load_string($resp);
590
-			if (false !== $respObject)
591
-			{
592
-				$respWellFormed = true;
593
-			}
594
-		}
595
-
596
-		//返回的HTTP文本不是标准JSON或者XML,记下错误日志
597
-		if (false === $respWellFormed)
598
-		{
599
-			$this->logCommunicationError($sysParams["method"],$requestUrl,"HTTP_RESPONSE_NOT_WELL_FORMED",$resp);
600
-			$result->code = 0;
601
-			$result->msg = "HTTP_RESPONSE_NOT_WELL_FORMED";
602
-			return $result;
603
-		}
604
-
605
-		//如果TOP返回了错误码,记录到业务错误日志中
606
-		if (isset($respObject->code))
607
-		{
608
-			$logger = new TopLogger;
609
-			$logger->conf["log_file"] = rtrim(TOP_SDK_WORK_DIR, '\\/') . '/' . "logs/top_biz_err_" .  "_" . date("Y-m-d") . ".log";
610
-			$logger->log(array(
611
-				date("Y-m-d H:i:s"),
612
-				$resp
613
-			));
614
-		}
615
-		return $respObject;
616
-	}
617
-
618
-	public function exec($paramsArray)
619
-	{
620
-		if (!isset($paramsArray["method"]))
621
-		{
622
-			trigger_error("No api name passed");
623
-		}
624
-		$inflector = new LtInflector;
625
-		$inflector->conf["separator"] = ".";
626
-		$requestClassName = ucfirst($inflector->camelize(substr($paramsArray["method"], 7))) . "Request";
627
-		if (!class_exists($requestClassName))
628
-		{
629
-			trigger_error("No such dingtalk-api: " . $paramsArray["method"]);
630
-		}
631
-
632
-		$session = isset($paramsArray["session"]) ? $paramsArray["session"] : null;
633
-
634
-		$req = new $requestClassName;
635
-		foreach($paramsArray as $paraKey => $paraValue)
636
-		{
637
-			$inflector->conf["separator"] = "_";
638
-			$setterMethodName = $inflector->camelize($paraKey);
639
-			$inflector->conf["separator"] = ".";
640
-			$setterMethodName = "set" . $inflector->camelize($setterMethodName);
641
-			if (method_exists($req, $setterMethodName))
642
-			{
643
-				$req->$setterMethodName($paraValue);
644
-			}
645
-		}
646
-		return $this->execute($req, $session);
647
-	}
648
-
649
-	private function getClusterTag()
650
-    {
651
-	    return substr($this->sdkVersion,0,11)."-cluster".substr($this->sdkVersion,11);
652
-    }
653
-}

+ 0 - 18
extend/taobaosdk/dingtalk/DingTalkConstant.php

@@ -1,18 +0,0 @@
1
-<?php
2
-/**
3
- * Created by PhpStorm.
4
- * User: zuodeng
5
- * Date: 2018/7/18
6
- * Time: 上午11:31
7
- */
8
-class DingTalkConstant
9
-{
10
-    static $CALL_TYPE_OAPI = "oapi";
11
-    static $CALL_TYPE_TOP = "top";
12
-
13
-    static $METHOD_POST = "POST";
14
-    static $METHOD_GET = "GET";
15
-
16
-    static $FORMAT_JSON = "json";
17
-    static $FORMAT_XML = "xml";
18
-}

+ 0 - 47
extend/taobaosdk/top/ApplicationVar.php

@@ -1,47 +0,0 @@
1
-<?php
2
-
3
-class ApplicationVar
4
-{
5
-	var $save_file;
6
-	var $application  = null;
7
- 	var $app_data    = '';
8
- 	var $__writed    = false;
9
-
10
-	function __construct()
11
- 	{
12
-    $this->save_file = __DIR__.'/httpdns.conf' ;
13
- 		$this->application = array();
14
- 	}
15
-
16
- 	public function setValue($var_name,$var_value)
17
-  {
18
-   		if (!is_string($var_name) || empty($var_name))
19
-    		return false;
20
-   
21
-   		$this->application[$var_name] = $var_value;
22
-  }
23
-
24
-  public function write(){
25
-      $this->app_data = @serialize($this->application);    
26
-      $this->__writeToFile();
27
-  }
28
-
29
- 	public function getValue()
30
- 	{
31
-     	if (!is_file($this->save_file))
32
-        	 $this->__writeToFile();
33
-     	return @unserialize(@file_get_contents($this->save_file));
34
- 	}
35
-
36
- 	function __writeToFile()
37
- 	{
38
-  		$fp = @fopen($this->save_file,"w");
39
-      if(flock($fp , LOCK_EX | LOCK_NB)){
40
-          @fwrite($fp,$this->app_data);
41
-          flock($fp , LOCK_UN);
42
-      }
43
-      @fclose($fp);
44
- 	}
45
-}
46
-
47
-?>

+ 0 - 199
extend/taobaosdk/top/ClusterTopClient.php

@@ -1,199 +0,0 @@
1
-<?php
2
-class ClusterTopClient extends TopClient {
3
-
4
-	private static $dnsconfig;
5
-	private static $syncDate = 0;
6
-	private static $applicationVar ;
7
-	private static $cfgDuration = 10;
8
-
9
-	public function __construct($appkey = "",$secretKey = ""){
10
-		ClusterTopClient::$applicationVar = new ApplicationVar;
11
-		$this->appkey = $appkey;
12
-		$this->secretKey = $secretKey ;
13
-		$saveConfig = ClusterTopClient::$applicationVar->getValue();
14
-
15
-		if($saveConfig){
16
-			$tmpConfig = $saveConfig['dnsconfig'];
17
-			ClusterTopClient::$dnsconfig = $this->object_to_array($tmpConfig);
18
-			unset($tmpConfig);
19
-
20
-			ClusterTopClient::$syncDate = $saveConfig['syncDate'];
21
-			if(!ClusterTopClient::$syncDate)
22
-				ClusterTopClient::$syncDate = 0;
23
-		}
24
-	}
25
-
26
-	public function __destruct(){
27
-		if(ClusterTopClient::$dnsconfig && ClusterTopClient::$syncDate){
28
-			ClusterTopClient::$applicationVar->setValue("dnsconfig",ClusterTopClient::$dnsconfig);
29
-			ClusterTopClient::$applicationVar->setValue("syncDate",ClusterTopClient::$syncDate);
30
-			ClusterTopClient::$applicationVar->write();
31
-		}
32
-	}
33
-
34
-	public function execute($request = null, $session = null,$bestUrl = null){
35
-		$currentDate = date('U');
36
-		$syncDuration = $this->getDnsConfigSyncDuration();
37
-		$bestUrl = $this->getBestVipUrl($this->gatewayUrl,$request->getApiMethodName(),$session);
38
-		if($currentDate - ClusterTopClient::$syncDate > $syncDuration * 60){
39
-			$httpdns = new HttpdnsGetRequest;
40
-			ClusterTopClient::$dnsconfig = json_decode(parent::execute($httpdns,null,$bestUrl)->result,true);
41
-			$syncDate = date('U');
42
-			ClusterTopClient::$syncDate = $syncDate ;
43
-		}
44
-		return parent::execute($request,$session,$bestUrl);
45
-	}
46
-
47
-	private function getDnsConfigSyncDuration(){
48
-		if(ClusterTopClient::$cfgDuration){
49
-			return ClusterTopClient::$cfgDuration;
50
-		}
51
-		if(!ClusterTopClient::$dnsconfig){
52
-			return ClusterTopClient::$cfgDuration;
53
-		}
54
-		$config = json_encode(ClusterTopClient::$dnsconfig);
55
-		if(!$config){
56
-			return ClusterTopClient::$cfgDuration;
57
-		}
58
-		$config = ClusterTopClient::$dnsconfig['config'];
59
-		$duration = $config['interval'];
60
-		ClusterTopClient::$cfgDuration = $duration;
61
-
62
-		return ClusterTopClient::$cfgDuration;
63
-	}
64
-
65
-	private function getBestVipUrl($url,$apiname = null,$session = null){
66
-		$config = ClusterTopClient::$dnsconfig['config'];
67
-		$degrade = $config['degrade'];
68
-		if(strcmp($degrade,'true') == 0){
69
-			return $url;
70
-		}		
71
-		$currentEnv = $this->getEnvByApiName($apiname,$session);
72
-		$vip = $this->getVipByEnv($url,$currentEnv);
73
-		if($vip)
74
-			return $vip;
75
-		return $url;
76
-	}
77
-
78
-	private function getVipByEnv($comUrl,$currentEnv){
79
-		$urlSchema = parse_url($comUrl);
80
-		if(!$urlSchema)
81
-			return null;
82
-		if(!ClusterTopClient::$dnsconfig['env'])
83
-			return null;
84
-		
85
-		if(!array_key_exists($currentEnv,ClusterTopClient::$dnsconfig['env']))
86
-			return null;
87
-
88
-		$hostList = ClusterTopClient::$dnsconfig['env'][$currentEnv];
89
-		if(!$hostList)
90
-			return null ;
91
-
92
-		$vipList = null;
93
-		foreach ($hostList as $key => $value) {
94
-			if(strcmp($key,$urlSchema['host']) == 0 && strcmp($value['proto'],$urlSchema['scheme']) == 0){
95
-				$vipList = $value;
96
-				break;
97
-			}
98
-		}
99
-		$vip = $this->getRandomWeightElement($vipList['vip']);
100
-		
101
-		if($vip){
102
-			return $urlSchema['scheme']."://".$vip.$urlSchema['path'];
103
-		}
104
-		return null;
105
-	}
106
-
107
-	private function getEnvByApiName($apiName,$session=""){
108
-		$apiCfgArray = ClusterTopClient::$dnsconfig['api'];
109
-		if($apiCfgArray){	
110
-			if(array_key_exists($apiName,$apiCfgArray)){
111
-				$apiCfg = $apiCfgArray[$apiName];
112
-				if(array_key_exists('user',$apiCfg)){
113
-					$userFlag = $apiCfg['user'];
114
-					$flag = $this->getUserFlag($session);
115
-					if($userFlag && $flag ){
116
-						return $this->getEnvBySessionFlag($userFlag,$flag);
117
-					}else{
118
-						return $this->getRandomWeightElement($apiCfg['rule']);
119
-					}
120
-				}
121
-			}
122
-		}
123
-		return $this->getDeafultEnv();
124
-	}
125
-
126
-	private function getUserFlag($session){
127
-		if($session && strlen($session) > 5){
128
-			if($session[0] == '6' || $session[0] == '7'){
129
-				return $session[strlen($session) -1];
130
-			}else if($session[0] == '5' || $session[0] == '8'){
131
-				return $session[5];
132
-			}
133
-		}
134
-		return null;
135
-	}
136
-
137
-	private function getEnvBySessionFlag($targetConfig,$flag){
138
-		if($flag){
139
-			$userConf = ClusterTopClient::$dnsconfig['user'];
140
-			$cfgArry = $userConf[$targetConfig];
141
-			foreach ($cfgArry as $key => $value) {
142
-				if(in_array($flag,$value))
143
-					return $key;
144
-			}
145
-		}else{
146
-			return null;
147
-		}
148
-	}
149
-
150
-	private function getRandomWeightElement($elements){
151
-		$totalWeight = 0;
152
-		if($elements){
153
-			foreach ($elements as $ele) {
154
-				$weight = $this->getElementWeight($ele);
155
-				$r = $this->randomFloat() * ($weight + $totalWeight);
156
-				if($r >= $totalWeight){
157
-					$selected = $ele;
158
-				}
159
-				$totalWeight += $weight;
160
-			}
161
-			if($selected){
162
-				return $this->getElementValue($selected);
163
-			}
164
-		}
165
-		return null;
166
-
167
-	}
168
-
169
-	private function getElementWeight($ele){
170
-		$params = explode('|', $ele);
171
-		return floatval($params[1]);
172
-	}
173
-	private function getElementValue($ele){
174
-		$params = explode('|', $ele);
175
-		return $params[0];		
176
-	}
177
-
178
-	private function getDeafultEnv(){
179
-		return ClusterTopClient::$dnsconfig['config']['def_env'];
180
-	}
181
-
182
-	private static function startsWith($haystack, $needle) {
183
-    	return $needle === "" || strpos($haystack, $needle) === 0;
184
-	}
185
-
186
-	private function object_to_array($obj) 
187
-	{ 
188
-    	$_arr= is_object($obj) ? get_object_vars($obj) : $obj; 
189
-    	foreach($_arr as $key=> $val) 
190
-    	{ 
191
-        	$val= (is_array($val) || is_object($val))? $this->object_to_array($val) : $val; 
192
-        	$arr[$key] = $val; 
193
-    	} 
194
-    	return$arr; 
195
-	}
196
-
197
-	private function randomFloat($min = 0, $max = 1) { return $min + mt_rand() / mt_getrandmax() * ($max - $min); }
198
-}
199
-?>

+ 0 - 23
extend/taobaosdk/top/HttpdnsGetRequest.php

@@ -1,23 +0,0 @@
1
-<?php
2
-
3
-class HttpdnsGetRequest
4
-{
5
-	private $apiParas = array();
6
-	
7
-	public function getApiMethodName()
8
-	{
9
-		return "taobao.httpdns.get";
10
-	}
11
-	
12
-	public function getApiParas()
13
-	{
14
-		return $this->apiParas;
15
-	}
16
-	
17
-	public function check(){}
18
-	
19
-	public function putOtherTextParam($key, $value) {
20
-		$this->apiParas[$key] = $value;
21
-		$this->$key = $value;
22
-	}
23
-}

+ 0 - 107
extend/taobaosdk/top/RequestCheckUtil.php

@@ -1,107 +0,0 @@
1
-<?php
2
-/**
3
- * API入参静态检查类
4
- * 可以对API的参数类型、长度、最大值等进行校验
5
- *
6
- **/
7
-class RequestCheckUtil
8
-{
9
-	/**
10
-	 * 校验字段 fieldName 的值$value非空
11
-	 *
12
-	 **/
13
-	public static function checkNotNull($value,$fieldName) {
14
-		
15
-		if(self::checkEmpty($value)){
16
-			throw new Exception("client-check-error:Missing Required Arguments: " .$fieldName , 40);
17
-		}
18
-	}
19
-
20
-	/**
21
-	 * 检验字段fieldName的值value 的长度
22
-	 *
23
-	 **/
24
-	public static function checkMaxLength($value,$maxLength,$fieldName){		
25
-		if(!self::checkEmpty($value) && mb_strlen($value , "UTF-8") > $maxLength){
26
-			throw new Exception("client-check-error:Invalid Arguments:the length of " .$fieldName . " can not be larger than " . $maxLength . "." , 41);
27
-		}
28
-	}
29
-
30
-	/**
31
-	 * 检验字段fieldName的值value的最大列表长度
32
-	 *
33
-	 **/
34
-	public static function checkMaxListSize($value,$maxSize,$fieldName) {	
35
-
36
-		if(self::checkEmpty($value))
37
-			return ;
38
-
39
-		$list=preg_split("/,/",$value);
40
-		if(count($list) > $maxSize){
41
-				throw new Exception("client-check-error:Invalid Arguments:the listsize(the string split by \",\") of ". $fieldName . " must be less than " . $maxSize . " ." , 41);
42
-		}
43
-	}
44
-
45
-	/**
46
-	 * 检验字段fieldName的值value 的最大值
47
-	 *
48
-	 **/
49
-	public static function checkMaxValue($value,$maxValue,$fieldName){	
50
-
51
-		if(self::checkEmpty($value))
52
-			return ;
53
-
54
-		self::checkNumeric($value,$fieldName);
55
-
56
-		if($value > $maxValue){
57
-				throw new Exception("client-check-error:Invalid Arguments:the value of " . $fieldName . " can not be larger than " . $maxValue ." ." , 41);
58
-		}
59
-	}
60
-
61
-	/**
62
-	 * 检验字段fieldName的值value 的最小值
63
-	 *
64
-	 **/
65
-	public static function checkMinValue($value,$minValue,$fieldName) {
66
-		
67
-		if(self::checkEmpty($value))
68
-			return ;
69
-
70
-		self::checkNumeric($value,$fieldName);
71
-		
72
-		if($value < $minValue){
73
-				throw new Exception("client-check-error:Invalid Arguments:the value of " . $fieldName . " can not be less than " . $minValue . " ." , 41);
74
-		}
75
-	}
76
-
77
-	/**
78
-	 * 检验字段fieldName的值value是否是number
79
-	 *
80
-	 **/
81
-	protected static function checkNumeric($value,$fieldName) {
82
-		if(!is_numeric($value))
83
-			throw new Exception("client-check-error:Invalid Arguments:the value of " . $fieldName . " is not number : " . $value . " ." , 41);
84
-	}
85
-
86
-	/**
87
-	 * 校验$value是否非空
88
-	 *  if not set ,return true;
89
-	 *	if is null , return true;
90
-	 *	
91
-	 *
92
-	 **/
93
-	public static function checkEmpty($value) {
94
-		if(!isset($value))
95
-			return true ;
96
-		if($value === null )
97
-			return true;
98
-		if(is_array($value) && count($value) == 0)
99
-			return true;
100
-		if(is_string($value) &&trim($value) === "")
101
-			return true;
102
-		
103
-		return false;
104
-	}
105
-
106
-}
107
-?>

+ 0 - 21
extend/taobaosdk/top/ResultSet.php

@@ -1,21 +0,0 @@
1
-<?php
2
-/**
3
- * 返回的默认类
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2015-01-20
7
- */
8
-class ResultSet
9
-{
10
-	
11
-	/** 
12
-	 * 返回的错误码
13
-	 **/
14
-	public $code;
15
-	
16
-	/** 
17
-	 * 返回的错误信息
18
-	 **/
19
-	public $msg;
20
-	
21
-}

+ 0 - 219
extend/taobaosdk/top/SpiUtils.php

@@ -1,219 +0,0 @@
1
-<?php
2
-class SpiUtils{
3
-	private static $top_sign_list = "HTTP_TOP_SIGN_LIST";
4
-	private static $timestamp = "timestamp";
5
-	private static $header_real_ip = array("X_Real_IP", "X_Forwarded_For", "Proxy_Client_IP",
6
-											"WL_Proxy_Client_IP", "HTTP_CLIENT_IP", "HTTP_X_FORWARDED_FOR");
7
-	/**
8
-	 * 校验SPI请求签名,适用于所有GET请求,及不包含文件参数的POST请求。
9
-	 * 
10
-	 * @param request 请求对象
11
-	 * @param secret app对应的secret
12
-	 * @return true:校验通过;false:校验不通过
13
-	 */
14
-	public static function checkSign4FormRequest($secret){
15
-		return self::checkSign(null,null,$secret);
16
-	}
17
-
18
-	/**
19
-	 * 校验SPI请求签名,适用于请求体是xml/json等可用文本表示的POST请求。
20
-	 * 
21
-	 * @param request 请求对象
22
-	 * @param body 请求体的文本内容
23
-	 * @param secret app对应的secret
24
-	 * @return true:校验通过;false:校验不通过
25
-	 */
26
-	public static function checkSign4TextRequest($body,$secret){
27
-		return self::checkSign(null,$body,$secret);
28
-	}
29
-	
30
-	/**
31
-	 * 校验SPI请求签名,适用于带文件上传的POST请求。
32
-	 * 
33
-	 * @param request 请求对象
34
-	 * @param form 除了文件参数以外的所有普通文本参数的map集合
35
-	 * @param secret app对应的secret
36
-	 * @return true:校验通过;false:校验不通过
37
-	 */
38
-	public static function checkSign4FileRequest($form, $secret){
39
-		return self::checkSign($form, null, $secret);
40
-	}
41
-
42
-	private static function checkSign($form, $body, $secret) {
43
-		$params = array();
44
-		// 1. 获取header参数
45
-		$headerMap = self::getHeaderMap();
46
-		foreach ($headerMap as $k => $v){
47
-			$params[$k] = $v ;
48
-		}
49
-
50
-		// 2. 获取url参数
51
-		$queryMap = self::getQueryMap();
52
-		foreach ($queryMap as $k => $v){
53
-			$params[$k] = $v ;
54
-		}
55
-
56
-		// 3. 获取form参数
57
-		if ($form == null && $body == null) {
58
-			$formMap = self::getFormMap();
59
-			foreach ($formMap as $k => $v){
60
-				$params[$k] = $v ;
61
-			}
62
-		} else if ($form != null) {
63
-			foreach ($form as $k => $v){
64
-				$params[$k] = $v ;
65
-			}
66
-		}
67
-
68
-		if($body == null){
69
-			$body = file_get_contents('php://input');
70
-		}
71
-
72
-		$remoteSign = $queryMap["sign"];
73
-		$localSign = self::sign($params, $body, $secret);
74
-		if (strcmp($remoteSign, $localSign) == 0) {
75
-			return true;
76
-		} else {
77
-			$paramStr = self::getParamStrFromMap($params);
78
-			self::logCommunicationError($remoteSign,$localSign,$paramStr,$body);
79
-			return false;
80
-		}
81
-	}
82
-
83
-	private static function getHeaderMap() {
84
-		$headerMap = array();
85
-		$signList = $_SERVER['HTTP_TOP_SIGN_LIST']; // 只获取参与签名的头部字段
86
-
87
-		if(!$signList) {
88
-			return $headerMap;
89
-		}
90
-
91
-		$signList = trim($signList);
92
-		if (strlen($signList) > 0){
93
-			$params = split(",", $signList);
94
-			foreach ($_SERVER as $k => $v){
95
-				if (substr($k, 0, 5) == 'HTTP_'){
96
-					foreach($params as $kk){
97
-						$upperkey = strtoupper($kk);
98
-						if(self::endWith($k,$upperkey)){
99
-							$headerMap[$kk] = $v;
100
-						}
101
-					}
102
-				}
103
-			}
104
-		}
105
-		return $headerMap;
106
-	}
107
-
108
-	private static function getQueryMap(){
109
-		$queryStr = $_SERVER["QUERY_STRING"];
110
-		$resultArray = array();
111
-		foreach (explode('&', $queryStr) as $pair) {
112
-		    list($key, $value) = explode('=', $pair);
113
-		    if (strpos($key, '.') !== false) {
114
-		        list($subKey, $subVal) = explode('.', $key);
115
-
116
-		        if (preg_match('/(?P<name>\w+)\[(?P<index>\w+)\]/', $subKey, $matches)) {
117
-		            $resultArray[$matches['name']][$matches['index']][$subVal] = $value;
118
-		        } else {
119
-		            $resultArray[$subKey][$subVal] = urldecode($value);
120
-		        }
121
-		    } else {
122
-		        $resultArray[$key] = urldecode($value);
123
-		    }
124
-		}
125
-		return $resultArray;
126
-	}
127
-
128
-	private static function checkRemoteIp(){
129
-		$remoteIp = $_SERVER["REMOTE_ADDR"];
130
-		foreach ($header_real_ip as $k){
131
-			$realIp = $_SERVER[$k];
132
-			$realIp = trim($realIp);
133
-			if(strlen($realIp) > 0 && strcasecmp("unknown",$realIp)){
134
-				$remoteIp = $realIp;
135
-				break;
136
-			}
137
-		}
138
-		return self::startsWith($remoteIp,"140.205.144.") || self::startsWith($remoteIp,"40.205.145.");
139
-	}
140
-
141
-	private static function getFormMap(){
142
-		$resultArray = array();
143
-		foreach($_POST as $key=>$v) { 
144
-			$resultArray[$key] = $v ;
145
-		}
146
-		return $resultArray ;	
147
-	}
148
-
149
-	private static function startsWith($haystack, $needle) {
150
-    	return $needle === "" || strpos($haystack, $needle) === 0;
151
-	}
152
-
153
-	private static function endWith($haystack, $needle) {   
154
-	    $length = strlen($needle);  
155
-	    if($length == 0)
156
-	    {    
157
-	        return true;  
158
-	    }  
159
-	    return (substr($haystack, -$length) === $needle);
160
- 	}
161
-
162
-	private static function checkTimestamp(){
163
-		$ts = $_POST['timestamp'];
164
-		if($ts){
165
-			$clientTimestamp = strtotime($ts);
166
-			$current = $_SERVER['REQUEST_TIME'];
167
-			return ($current - $clientTimestamp) <= 5*60*1000;
168
-		}else{
169
-			return false;
170
-		}
171
-	}
172
-
173
-	private static function getParamStrFromMap($params){
174
-		ksort($params);
175
-		$stringToBeSigned = "";
176
-		foreach ($params as $k => $v)
177
-		{
178
-			if(strcmp("sign", $k) != 0)
179
-			{
180
-				$stringToBeSigned .= "$k$v";
181
-			}
182
-		}
183
-		unset($k, $v);
184
-		return $stringToBeSigned;
185
-	}
186
-
187
-	private static function sign($params,$body,$secret){
188
-		ksort($params);
189
-
190
-		$stringToBeSigned = $secret;
191
-		$stringToBeSigned .= self::getParamStrFromMap($params);
192
-
193
-		if($body)
194
-			$stringToBeSigned .= $body;
195
-		$stringToBeSigned .= $secret;
196
-		return strtoupper(md5($stringToBeSigned));
197
-	}
198
-
199
-	protected static function logCommunicationError($remoteSign, $localSign, $paramStr, $body)
200
-	{
201
-		$localIp = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : "CLI";
202
-		$logger = new TopLogger;
203
-		$logger->conf["log_file"] = rtrim(TOP_SDK_WORK_DIR, '\\/') . '/' . "logs/top_comm_err_". date("Y-m-d") . ".log";
204
-		$logger->conf["separator"] = "^_^";
205
-		$logData = array(
206
-		"checkTopSign error" ,
207
-		"remoteSign=".$remoteSign ,
208
-		"localSign=".$localSign ,
209
-		"paramStr=".$paramStr ,
210
-		"body=".$body
211
-		);
212
-		$logger->log($logData);
213
-	}
214
-	private static function clear_blank($str, $glue='')
215
-	{
216
-		$replace = array(" ", "\r", "\n", "\t"); return str_replace($replace, $glue, $str);
217
-	}
218
-}
219
-?>

+ 0 - 377
extend/taobaosdk/top/TopClient.php

@@ -1,377 +0,0 @@
1
-<?php
2
-class TopClient
3
-{
4
-	public $appkey;
5
-
6
-	public $secretKey;
7
-
8
-	public $gatewayUrl = "http://gw.api.taobao.com/router/rest";
9
-
10
-	public $format = "xml";
11
-
12
-	public $connectTimeout;
13
-
14
-	public $readTimeout;
15
-
16
-	/** 是否打开入参check**/
17
-	public $checkRequest = true;
18
-
19
-	protected $signMethod = "md5";
20
-
21
-	protected $apiVersion = "2.0";
22
-
23
-	protected $sdkVersion = "top-sdk-php-20180326";
24
-
25
-	public function getAppkey()
26
-	{
27
-		return $this->appkey;
28
-	}
29
-
30
-	public function __construct($appkey = "",$secretKey = ""){
31
-		$this->appkey = $appkey;
32
-		$this->secretKey = $secretKey ;
33
-	}
34
-
35
-	protected function generateSign($params)
36
-	{
37
-		ksort($params);
38
-
39
-		$stringToBeSigned = $this->secretKey;
40
-		foreach ($params as $k => $v)
41
-		{
42
-			if(!is_array($v) && "@" != substr($v, 0, 1))
43
-			{
44
-				$stringToBeSigned .= "$k$v";
45
-			}
46
-		}
47
-		unset($k, $v);
48
-		$stringToBeSigned .= $this->secretKey;
49
-
50
-		return strtoupper(md5($stringToBeSigned));
51
-	}
52
-
53
-	public function curl($url, $postFields = null)
54
-	{
55
-		$ch = curl_init();
56
-		curl_setopt($ch, CURLOPT_URL, $url);
57
-		curl_setopt($ch, CURLOPT_FAILONERROR, false);
58
-		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
59
-		if ($this->readTimeout) {
60
-			curl_setopt($ch, CURLOPT_TIMEOUT, $this->readTimeout);
61
-		}
62
-		if ($this->connectTimeout) {
63
-			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);
64
-		}
65
-		curl_setopt ( $ch, CURLOPT_USERAGENT, "top-sdk-php" );
66
-		//https 请求
67
-		if(strlen($url) > 5 && strtolower(substr($url,0,5)) == "https" ) {
68
-			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
69
-			curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
70
-		}
71
-
72
-		if (is_array($postFields) && 0 < count($postFields))
73
-		{
74
-			$postBodyString = "";
75
-			$postMultipart = false;
76
-			foreach ($postFields as $k => $v)
77
-			{
78
-				if("@" != substr($v, 0, 1))//判断是不是文件上传
79
-				{
80
-					$postBodyString .= "$k=" . urlencode($v) . "&"; 
81
-				}
82
-				else//文件上传用multipart/form-data,否则用www-form-urlencoded
83
-				{
84
-					$postMultipart = true;
85
-					if(class_exists('\CURLFile')){
86
-						$postFields[$k] = new \CURLFile(substr($v, 1));
87
-					}
88
-				}
89
-			}
90
-			unset($k, $v);
91
-			curl_setopt($ch, CURLOPT_POST, true);
92
-			if ($postMultipart)
93
-			{
94
-				if (class_exists('\CURLFile')) {
95
-				    curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true);
96
-				} else {
97
-				    if (defined('CURLOPT_SAFE_UPLOAD')) {
98
-				        curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);
99
-				    }
100
-				}
101
-				curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
102
-			}
103
-			else
104
-			{
105
-				$header = array("content-type: application/x-www-form-urlencoded; charset=UTF-8");
106
-				curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
107
-				curl_setopt($ch, CURLOPT_POSTFIELDS, substr($postBodyString,0,-1));
108
-			}
109
-		}
110
-		$reponse = curl_exec($ch);
111
-		
112
-		if (curl_errno($ch))
113
-		{
114
-			throw new Exception(curl_error($ch),0);
115
-		}
116
-		else
117
-		{
118
-			$httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
119
-			if (200 !== $httpStatusCode)
120
-			{
121
-				throw new Exception($reponse,$httpStatusCode);
122
-			}
123
-		}
124
-		curl_close($ch);
125
-		return $reponse;
126
-	}
127
-	public function curl_with_memory_file($url, $postFields = null, $fileFields = null)
128
-	{
129
-		$ch = curl_init();
130
-		curl_setopt($ch, CURLOPT_URL, $url);
131
-		curl_setopt($ch, CURLOPT_FAILONERROR, false);
132
-		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
133
-		if ($this->readTimeout) {
134
-			curl_setopt($ch, CURLOPT_TIMEOUT, $this->readTimeout);
135
-		}
136
-		if ($this->connectTimeout) {
137
-			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout);
138
-		}
139
-		curl_setopt ( $ch, CURLOPT_USERAGENT, "top-sdk-php" );
140
-		//https 请求
141
-		if(strlen($url) > 5 && strtolower(substr($url,0,5)) == "https" ) {
142
-			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
143
-			curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
144
-		}
145
-		//生成分隔符
146
-		$delimiter = '-------------' . uniqid();
147
-		//先将post的普通数据生成主体字符串
148
-		$data = '';
149
-		if($postFields != null){
150
-			foreach ($postFields as $name => $content) {
151
-			    $data .= "--" . $delimiter . "\r\n";
152
-			    $data .= 'Content-Disposition: form-data; name="' . $name . '"';
153
-			    //multipart/form-data 不需要urlencode,参见 http:stackoverflow.com/questions/6603928/should-i-url-encode-post-data
154
-			    $data .= "\r\n\r\n" . $content . "\r\n";
155
-			}
156
-			unset($name,$content);
157
-		}
158
-
159
-		//将上传的文件生成主体字符串
160
-		if($fileFields != null){
161
-			foreach ($fileFields as $name => $file) {
162
-			    $data .= "--" . $delimiter . "\r\n";
163
-			    $data .= 'Content-Disposition: form-data; name="' . $name . '"; filename="' . $file['name'] . "\" \r\n";
164
-			    $data .= 'Content-Type: ' . $file['type'] . "\r\n\r\n";//多了个文档类型
165
-
166
-			    $data .= $file['content'] . "\r\n";
167
-			}
168
-			unset($name,$file);
169
-		}
170
-		//主体结束的分隔符
171
-		$data .= "--" . $delimiter . "--";
172
-
173
-		curl_setopt($ch, CURLOPT_POST, true);
174
-		curl_setopt($ch, CURLOPT_HTTPHEADER , array(
175
-		    'Content-Type: multipart/form-data; boundary=' . $delimiter,
176
-		    'Content-Length: ' . strlen($data))
177
-		); 
178
-		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
179
-		curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
180
-
181
-		$reponse = curl_exec($ch);
182
-		unset($data);
183
-
184
-		if (curl_errno($ch))
185
-		{
186
-			throw new Exception(curl_error($ch),0);
187
-		}
188
-		else
189
-		{
190
-			$httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
191
-			if (200 !== $httpStatusCode)
192
-			{
193
-				throw new Exception($reponse,$httpStatusCode);
194
-			}
195
-		}
196
-		curl_close($ch);
197
-		return $reponse;
198
-	}
199
-
200
-	protected function logCommunicationError($apiName, $requestUrl, $errorCode, $responseTxt)
201
-	{
202
-		$localIp = isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : "CLI";
203
-		$logger = new TopLogger;
204
-		$logger->conf["log_file"] = rtrim(TOP_SDK_WORK_DIR, '\\/') . '/' . "logs/top_comm_err_" . $this->appkey . "_" . date("Y-m-d") . ".log";
205
-		$logger->conf["separator"] = "^_^";
206
-		$logData = array(
207
-		date("Y-m-d H:i:s"),
208
-		$apiName,
209
-		$this->appkey,
210
-		$localIp,
211
-		PHP_OS,
212
-		$this->sdkVersion,
213
-		$requestUrl,
214
-		$errorCode,
215
-		str_replace("\n","",$responseTxt)
216
-		);
217
-		$logger->log($logData);
218
-	}
219
-
220
-	public function execute($request, $session = null,$bestUrl = null)
221
-	{
222
-		$result =  new ResultSet(); 
223
-		if($this->checkRequest) {
224
-			try {
225
-				$request->check();
226
-			} catch (Exception $e) {
227
-
228
-				$result->code = $e->getCode();
229
-				$result->msg = $e->getMessage();
230
-				return $result;
231
-			}
232
-		}
233
-		//组装系统参数
234
-		$sysParams["app_key"] = $this->appkey;
235
-		$sysParams["v"] = $this->apiVersion;
236
-		$sysParams["format"] = $this->format;
237
-		$sysParams["sign_method"] = $this->signMethod;
238
-		$sysParams["method"] = $request->getApiMethodName();
239
-		$sysParams["timestamp"] = date("Y-m-d H:i:s");
240
-		if (null != $session)
241
-		{
242
-			$sysParams["session"] = $session;
243
-		}
244
-		$apiParams = array();
245
-		//获取业务参数
246
-		$apiParams = $request->getApiParas();
247
-
248
-
249
-		//系统参数放入GET请求串
250
-		if($bestUrl){
251
-			$requestUrl = $bestUrl."?";
252
-			$sysParams["partner_id"] = $this->getClusterTag();
253
-		}else{
254
-			$requestUrl = $this->gatewayUrl."?";
255
-			$sysParams["partner_id"] = $this->sdkVersion;
256
-		}
257
-		//签名
258
-		$sysParams["sign"] = $this->generateSign(array_merge($apiParams, $sysParams));
259
-
260
-		foreach ($sysParams as $sysParamKey => $sysParamValue)
261
-		{
262
-			// if(strcmp($sysParamKey,"timestamp") != 0)
263
-			$requestUrl .= "$sysParamKey=" . urlencode($sysParamValue) . "&";
264
-		}
265
-
266
-		$fileFields = array();
267
-		foreach ($apiParams as $key => $value) {
268
-			if(is_array($value) && array_key_exists('type',$value) && array_key_exists('content',$value) ){
269
-				$value['name'] = $key;
270
-				$fileFields[$key] = $value;
271
-				unset($apiParams[$key]);
272
-			}
273
-		}
274
-
275
-		// $requestUrl .= "timestamp=" . urlencode($sysParams["timestamp"]) . "&";
276
-		$requestUrl = substr($requestUrl, 0, -1);
277
-
278
-		//发起HTTP请求
279
-		try
280
-		{
281
-			if(count($fileFields) > 0){
282
-				$resp = $this->curl_with_memory_file($requestUrl, $apiParams, $fileFields);
283
-			}else{
284
-				$resp = $this->curl($requestUrl, $apiParams);
285
-			}
286
-		}
287
-		catch (Exception $e)
288
-		{
289
-			$this->logCommunicationError($sysParams["method"],$requestUrl,"HTTP_ERROR_" . $e->getCode(),$e->getMessage());
290
-			$result->code = $e->getCode();
291
-			$result->msg = $e->getMessage();
292
-			return $result;
293
-		}
294
-
295
-		unset($apiParams);
296
-		unset($fileFields);
297
-		//解析TOP返回结果
298
-		$respWellFormed = false;
299
-		if ("json" == $this->format)
300
-		{
301
-			$respObject = json_decode($resp);
302
-			if (null !== $respObject)
303
-			{
304
-				$respWellFormed = true;
305
-				foreach ($respObject as $propKey => $propValue)
306
-				{
307
-					$respObject = $propValue;
308
-				}
309
-			}
310
-		}
311
-		else if("xml" == $this->format)
312
-		{
313
-			$respObject = @simplexml_load_string($resp);
314
-			if (false !== $respObject)
315
-			{
316
-				$respWellFormed = true;
317
-			}
318
-		}
319
-
320
-		//返回的HTTP文本不是标准JSON或者XML,记下错误日志
321
-		if (false === $respWellFormed)
322
-		{
323
-			$this->logCommunicationError($sysParams["method"],$requestUrl,"HTTP_RESPONSE_NOT_WELL_FORMED",$resp);
324
-			$result->code = 0;
325
-			$result->msg = "HTTP_RESPONSE_NOT_WELL_FORMED";
326
-			return $result;
327
-		}
328
-
329
-		//如果TOP返回了错误码,记录到业务错误日志中
330
-		if (isset($respObject->code))
331
-		{
332
-			$logger = new TopLogger;
333
-			$logger->conf["log_file"] = rtrim(TOP_SDK_WORK_DIR, '\\/') . '/' . "logs/top_biz_err_" . $this->appkey . "_" . date("Y-m-d") . ".log";
334
-			$logger->log(array(
335
-				date("Y-m-d H:i:s"),
336
-				$resp
337
-			));
338
-		}
339
-		return $respObject;
340
-	}
341
-
342
-	public function exec($paramsArray)
343
-	{
344
-		if (!isset($paramsArray["method"]))
345
-		{
346
-			trigger_error("No api name passed");
347
-		}
348
-		$inflector = new LtInflector;
349
-		$inflector->conf["separator"] = ".";
350
-		$requestClassName = ucfirst($inflector->camelize(substr($paramsArray["method"], 7))) . "Request";
351
-		if (!class_exists($requestClassName))
352
-		{
353
-			trigger_error("No such api: " . $paramsArray["method"]);
354
-		}
355
-
356
-		$session = isset($paramsArray["session"]) ? $paramsArray["session"] : null;
357
-
358
-		$req = new $requestClassName;
359
-		foreach($paramsArray as $paraKey => $paraValue)
360
-		{
361
-			$inflector->conf["separator"] = "_";
362
-			$setterMethodName = $inflector->camelize($paraKey);
363
-			$inflector->conf["separator"] = ".";
364
-			$setterMethodName = "set" . $inflector->camelize($setterMethodName);
365
-			if (method_exists($req, $setterMethodName))
366
-			{
367
-				$req->$setterMethodName($paraValue);
368
-			}
369
-		}
370
-		return $this->execute($req, $session);
371
-	}
372
-
373
-	private function getClusterTag()
374
-    {
375
-	    return substr($this->sdkVersion,0,11)."-cluster".substr($this->sdkVersion,11);
376
-    }
377
-}

+ 0 - 43
extend/taobaosdk/top/TopLogger.php

@@ -1,43 +0,0 @@
1
-<?php
2
-class TopLogger
3
-{
4
-	public $conf = array(
5
-		"separator" => "\t",
6
-		"log_file" => ""
7
-	);
8
-
9
-	private $fileHandle;
10
-
11
-	protected function getFileHandle()
12
-	{
13
-		if (null === $this->fileHandle)
14
-		{
15
-			if (empty($this->conf["log_file"]))
16
-			{
17
-				trigger_error("no log file spcified.");
18
-			}
19
-			$logDir = dirname($this->conf["log_file"]);
20
-			if (!is_dir($logDir))
21
-			{
22
-				mkdir($logDir, 0777, true);
23
-			}
24
-			$this->fileHandle = fopen($this->conf["log_file"], "a");
25
-		}
26
-		return $this->fileHandle;
27
-	}
28
-
29
-	public function log($logData)
30
-	{
31
-		if ("" == $logData || array() == $logData)
32
-		{
33
-			return false;
34
-		}
35
-		if (is_array($logData))
36
-		{
37
-			$logData = implode($this->conf["separator"], $logData);
38
-		}
39
-		$logData = $logData. "\n";
40
-		fwrite($this->getFileHandle(), $logData);
41
-	}
42
-}
43
-?>

+ 0 - 35
extend/taobaosdk/top/domain/Area.php

@@ -1,35 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 地址区域结构
5
- * @author auto create
6
- */
7
-class Area
8
-{
9
-	
10
-	/** 
11
-	 * 标准行政区域代码.参考:http://www.stats.gov.cn/tjbz/xzqhdm/t20120105_402777427.htm
12
-	 **/
13
-	public $id;
14
-	
15
-	/** 
16
-	 * 地域名称.如北京市,杭州市,西湖区,每一个area_id 都代表了一个具体的地区.
17
-	 **/
18
-	public $name;
19
-	
20
-	/** 
21
-	 * 父节点区域标识.如北京市的area_id是110100,朝阳区是北京市的一个区,所以朝阳区的parent_id就是北京市的area_id.
22
-	 **/
23
-	public $parent_id;
24
-	
25
-	/** 
26
-	 * 区域类型.area区域 1:country/国家;2:province/省/自治区/直辖市;3:city/地区(省下面的地级市);4:district/县/市(县级市)/区;abroad:海外. 比如北京市的area_type = 2,朝阳区是北京市的一个区,所以朝阳区的area_type = 4.
27
-	 **/
28
-	public $type;
29
-	
30
-	/** 
31
-	 * 具体一个地区的邮编
32
-	 **/
33
-	public $zip;	
34
-}
35
-?>

+ 0 - 15
extend/taobaosdk/top/domain/Data.php

@@ -1,15 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * data
5
- * @author auto create
6
- */
7
-class Data
8
-{
9
-	
10
-	/** 
11
-	 * data
12
-	 **/
13
-	public $data;	
14
-}
15
-?>

+ 0 - 15
extend/taobaosdk/top/domain/Extend.php

@@ -1,15 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 扩展属性
5
- * @author auto create
6
- */
7
-class Extend
8
-{
9
-	
10
-	/** 
11
-	 * empty
12
-	 **/
13
-	public $empty;	
14
-}
15
-?>

+ 0 - 20
extend/taobaosdk/top/domain/FavoritesDetail.php

@@ -1,20 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 选品库详细信息
5
- * @author auto create
6
- */
7
-class FavoritesDetail
8
-{
9
-	
10
-	/** 
11
-	 * 选品库id
12
-	 **/
13
-	public $favorites_id;
14
-	
15
-	/** 
16
-	 * 选品库标题
17
-	 **/
18
-	public $favorites_title;	
19
-}
20
-?>

+ 0 - 20
extend/taobaosdk/top/domain/FavoritesInfo.php

@@ -1,20 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 选品库信息
5
- * @author auto create
6
- */
7
-class FavoritesInfo
8
-{
9
-	
10
-	/** 
11
-	 * 选品库详细信息
12
-	 **/
13
-	public $favorites_list;
14
-	
15
-	/** 
16
-	 * 选品库总数量
17
-	 **/
18
-	public $total_count;	
19
-}
20
-?>

+ 0 - 20
extend/taobaosdk/top/domain/Feature.php

@@ -1,20 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 类目属性
5
- * @author auto create
6
- */
7
-class Feature
8
-{
9
-	
10
-	/** 
11
-	 * 属性键
12
-	 **/
13
-	public $attr_key;
14
-	
15
-	/** 
16
-	 * 属性值
17
-	 **/
18
-	public $attr_value;	
19
-}
20
-?>

文件差异内容过多而无法显示
+ 0 - 560
extend/taobaosdk/top/domain/Item.php


+ 0 - 30
extend/taobaosdk/top/domain/ItemImg.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * ItemImg结构
5
- * @author auto create
6
- */
7
-class ItemImg
8
-{
9
-	
10
-	/** 
11
-	 * 图片创建时间 时间格式:yyyy-MM-dd HH:mm:ss
12
-	 **/
13
-	public $created;
14
-	
15
-	/** 
16
-	 * 商品图片的id,和商品相对应(主图id默认为0)
17
-	 **/
18
-	public $id;
19
-	
20
-	/** 
21
-	 * 图片放在第几张(多图时可设置)
22
-	 **/
23
-	public $position;
24
-	
25
-	/** 
26
-	 * 图片链接地址
27
-	 **/
28
-	public $url;	
29
-}
30
-?>

+ 0 - 110
extend/taobaosdk/top/domain/Items.php

@@ -1,110 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 商品数据
5
- * @author auto create
6
- */
7
-class Items
8
-{
9
-	
10
-	/** 
11
-	 * 聚划算价格,单位分
12
-	 **/
13
-	public $act_price;
14
-	
15
-	/** 
16
-	 * 类目名称
17
-	 **/
18
-	public $category_name;
19
-	
20
-	/** 
21
-	 * itemId
22
-	 **/
23
-	public $item_id;
24
-	
25
-	/** 
26
-	 * 商品卖点
27
-	 **/
28
-	public $item_usp_list;
29
-	
30
-	/** 
31
-	 * 聚划算id
32
-	 **/
33
-	public $ju_id;
34
-	
35
-	/** 
36
-	 * 开团结束时间
37
-	 **/
38
-	public $online_end_time;
39
-	
40
-	/** 
41
-	 * 开团时间
42
-	 **/
43
-	public $online_start_time;
44
-	
45
-	/** 
46
-	 * 原价
47
-	 **/
48
-	public $orig_price;
49
-	
50
-	/** 
51
-	 * 是否包邮
52
-	 **/
53
-	public $pay_postage;
54
-	
55
-	/** 
56
-	 * pc链接
57
-	 **/
58
-	public $pc_url;
59
-	
60
-	/** 
61
-	 * pc主图
62
-	 **/
63
-	public $pic_url_for_p_c;
64
-	
65
-	/** 
66
-	 * 无线主图
67
-	 **/
68
-	public $pic_url_for_w_l;
69
-	
70
-	/** 
71
-	 * 频道id
72
-	 **/
73
-	public $platform_id;
74
-	
75
-	/** 
76
-	 * 价格卖点
77
-	 **/
78
-	public $price_usp_list;
79
-	
80
-	/** 
81
-	 * 展示结束时间
82
-	 **/
83
-	public $show_end_time;
84
-	
85
-	/** 
86
-	 * 开始展示时间
87
-	 **/
88
-	public $show_start_time;
89
-	
90
-	/** 
91
-	 * 淘宝类目id
92
-	 **/
93
-	public $tb_first_cat_id;
94
-	
95
-	/** 
96
-	 * 商品标题
97
-	 **/
98
-	public $title;
99
-	
100
-	/** 
101
-	 * 卖点描述
102
-	 **/
103
-	public $usp_desc_list;
104
-	
105
-	/** 
106
-	 * 无线链接
107
-	 **/
108
-	public $wap_url;	
109
-}
110
-?>

+ 0 - 29
extend/taobaosdk/top/domain/KfcSearchResult.php

@@ -1,29 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * KFC 关键词过滤匹配结果
5
- * @author auto create
6
- */
7
-class KfcSearchResult
8
-{
9
-	
10
-	/** 
11
-	 * 过滤后的文本:
12
-当匹配到B等级的词时,文本中的关键词被替换为*号,content即为关键词替换后的文本;
13
-其他情况,content始终为null
14
-	 **/
15
-	public $content;
16
-	
17
-	/** 
18
-	 * 匹配到的关键词的等级,值为null,或为A、B、C、D。
19
-当匹配不到关键词时,值为null,否则值为A、B、C、D中的一个。
20
-A、B、C、D等级按严重程度从高至低排列。
21
-	 **/
22
-	public $level;
23
-	
24
-	/** 
25
-	 * 是否匹配到关键词,匹配到则为true.
26
-	 **/
27
-	public $matched;	
28
-}
29
-?>

+ 0 - 40
extend/taobaosdk/top/domain/Location.php

@@ -1,40 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 用户地址
5
- * @author auto create
6
- */
7
-class Location
8
-{
9
-	
10
-	/** 
11
-	 * 详细地址,最大256个字节(128个中文)
12
-	 **/
13
-	public $address;
14
-	
15
-	/** 
16
-	 * 所在城市(中文名称)
17
-	 **/
18
-	public $city;
19
-	
20
-	/** 
21
-	 * 国家名称
22
-	 **/
23
-	public $country;
24
-	
25
-	/** 
26
-	 * 区/县(只适用于物流API)
27
-	 **/
28
-	public $district;
29
-	
30
-	/** 
31
-	 * 所在省份(中文名称)
32
-	 **/
33
-	public $state;
34
-	
35
-	/** 
36
-	 * 邮政编码
37
-	 **/
38
-	public $zip;	
39
-}
40
-?>

+ 0 - 15
extend/taobaosdk/top/domain/MapData.php

@@ -1,15 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 返回结果封装对象
5
- * @author auto create
6
- */
7
-class MapData
8
-{
9
-	
10
-	/** 
11
-	 * 若为超红新用户,则返回1 若非超红新用户,则返回0
12
-	 **/
13
-	public $is_new_user;	
14
-}
15
-?>

+ 0 - 210
extend/taobaosdk/top/domain/NTbkItem.php

@@ -1,210 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 淘宝客商品
5
- * @author auto create
6
- */
7
-class NTbkItem
8
-{
9
-	
10
-	/** 
11
-	 * 叶子类目名称
12
-	 **/
13
-	public $cat_leaf_name;
14
-	
15
-	/** 
16
-	 * 一级类目名称
17
-	 **/
18
-	public $cat_name;
19
-	
20
-	/** 
21
-	 * 是否包邮
22
-	 **/
23
-	public $free_shipment;
24
-	
25
-	/** 
26
-	 * 好评率是否高于行业均值
27
-	 **/
28
-	public $h_good_rate;
29
-	
30
-	/** 
31
-	 * 成交转化是否高于行业均值
32
-	 **/
33
-	public $h_pay_rate30;
34
-	
35
-	/** 
36
-	 * 退款率是否低于行业均值
37
-	 **/
38
-	public $i_rfd_rate;
39
-	
40
-	/** 
41
-	 * 是否加入消费者保障
42
-	 **/
43
-	public $is_prepay;
44
-	
45
-	/** 
46
-	 * 商品链接
47
-	 **/
48
-	public $item_url;
49
-	
50
-	/** 
51
-	 * 聚划算信息-聚淘结束时间(毫秒)
52
-	 **/
53
-	public $ju_online_end_time;
54
-	
55
-	/** 
56
-	 * 聚划算信息-聚淘开始时间(毫秒)
57
-	 **/
58
-	public $ju_online_start_time;
59
-	
60
-	/** 
61
-	 * 聚划算满减  -结束时间(毫秒)
62
-	 **/
63
-	public $ju_play_end_time;
64
-	
65
-	/** 
66
-	 * 聚划算满减  -开始时间(毫秒)
67
-	 **/
68
-	public $ju_play_start_time;
69
-	
70
-	/** 
71
-	 * 聚划算信息-商品预热结束时间(毫秒)
72
-	 **/
73
-	public $ju_pre_show_end_time;
74
-	
75
-	/** 
76
-	 * 聚划算信息-商品预热开始时间(毫秒)
77
-	 **/
78
-	public $ju_pre_show_start_time;
79
-	
80
-	/** 
81
-	 * 跨店满减信息
82
-	 **/
83
-	public $kuadian_promotion_info;
84
-	
85
-	/** 
86
-	 * 商品库类型,支持多库类型输出,以英文逗号分隔“,”分隔,1:营销商品主推库,如果值为空则不属于1这种商品类型
87
-	 **/
88
-	public $material_lib_type;
89
-	
90
-	/** 
91
-	 * 店铺名称
92
-	 **/
93
-	public $nick;
94
-	
95
-	/** 
96
-	 * 商品ID
97
-	 **/
98
-	public $num_iid;
99
-	
100
-	/** 
101
-	 * 商品主图
102
-	 **/
103
-	public $pict_url;
104
-	
105
-	/** 
106
-	 * 1聚划算满减:满N件减X元,满N件X折,满N件X元)  2天猫限时抢:前N分钟每件X元,前N分钟满N件每件X元,前N件每件X元)
107
-	 **/
108
-	public $play_info;
109
-	
110
-	/** 
111
-	 * 预售商品-定金(元)
112
-	 **/
113
-	public $presale_deposit;
114
-	
115
-	/** 
116
-	 * 预售商品-商品优惠信息
117
-	 **/
118
-	public $presale_discount_fee_text;
119
-	
120
-	/** 
121
-	 * 预售商品-付定金结束时间(毫秒)
122
-	 **/
123
-	public $presale_end_time;
124
-	
125
-	/** 
126
-	 * 预售商品-付定金开始时间(毫秒)
127
-	 **/
128
-	public $presale_start_time;
129
-	
130
-	/** 
131
-	 * 预售商品-付定金结束时间(毫秒)
132
-	 **/
133
-	public $presale_tail_end_time;
134
-	
135
-	/** 
136
-	 * 预售商品-付尾款开始时间(毫秒)
137
-	 **/
138
-	public $presale_tail_start_time;
139
-	
140
-	/** 
141
-	 * 商品所在地
142
-	 **/
143
-	public $provcity;
144
-	
145
-	/** 
146
-	 * 卖家等级
147
-	 **/
148
-	public $ratesum;
149
-	
150
-	/** 
151
-	 * 商品一口价格
152
-	 **/
153
-	public $reserve_price;
154
-	
155
-	/** 
156
-	 * 活动价
157
-	 **/
158
-	public $sale_price;
159
-	
160
-	/** 
161
-	 * 卖家id
162
-	 **/
163
-	public $seller_id;
164
-	
165
-	/** 
166
-	 * 店铺dsr 评分
167
-	 **/
168
-	public $shop_dsr;
169
-	
170
-	/** 
171
-	 * 商品小图列表
172
-	 **/
173
-	public $small_images;
174
-	
175
-	/** 
176
-	 * 是否品牌精选,0不是,1是
177
-	 **/
178
-	public $superior_brand;
179
-	
180
-	/** 
181
-	 * 商品标题
182
-	 **/
183
-	public $title;
184
-	
185
-	/** 
186
-	 * 天猫限时抢可售  -结束时间(毫秒)
187
-	 **/
188
-	public $tmall_play_activity_end_time;
189
-	
190
-	/** 
191
-	 * 天猫限时抢可售  -开始时间(毫秒)
192
-	 **/
193
-	public $tmall_play_activity_start_time;
194
-	
195
-	/** 
196
-	 * 卖家类型,0表示集市,1表示商城
197
-	 **/
198
-	public $user_type;
199
-	
200
-	/** 
201
-	 * 30天销量
202
-	 **/
203
-	public $volume;
204
-	
205
-	/** 
206
-	 * 折扣价(元) 若属于预售商品,付定金时间内,折扣价=预售价
207
-	 **/
208
-	public $zk_final_price;	
209
-}
210
-?>

+ 0 - 45
extend/taobaosdk/top/domain/NTbkShop.php

@@ -1,45 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 淘宝客店铺
5
- * @author auto create
6
- */
7
-class NTbkShop
8
-{
9
-	
10
-	/** 
11
-	 * 淘客地址
12
-	 **/
13
-	public $click_url;
14
-	
15
-	/** 
16
-	 * 店标图片
17
-	 **/
18
-	public $pict_url;
19
-	
20
-	/** 
21
-	 * 卖家昵称
22
-	 **/
23
-	public $seller_nick;
24
-	
25
-	/** 
26
-	 * 店铺名称
27
-	 **/
28
-	public $shop_title;
29
-	
30
-	/** 
31
-	 * 店铺类型,B:天猫,C:淘宝
32
-	 **/
33
-	public $shop_type;
34
-	
35
-	/** 
36
-	 * 店铺地址
37
-	 **/
38
-	public $shop_url;
39
-	
40
-	/** 
41
-	 * 卖家ID
42
-	 **/
43
-	public $user_id;	
44
-}
45
-?>

+ 0 - 170
extend/taobaosdk/top/domain/OpenAccount.php

@@ -1,170 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * Open Account模型
5
- * @author auto create
6
- */
7
-class OpenAccount
8
-{
9
-	
10
-	/** 
11
-	 * 支付宝的帐号标识
12
-	 **/
13
-	public $alipay_id;
14
-	
15
-	/** 
16
-	 * 头像url
17
-	 **/
18
-	public $avatar_url;
19
-	
20
-	/** 
21
-	 * 银行卡号
22
-	 **/
23
-	public $bank_card_no;
24
-	
25
-	/** 
26
-	 * 银行卡的拥有者姓名
27
-	 **/
28
-	public $bank_card_owner_name;
29
-	
30
-	/** 
31
-	 * 出生日期
32
-	 **/
33
-	public $birthday;
34
-	
35
-	/** 
36
-	 * 创建帐号的App Key
37
-	 **/
38
-	public $create_app_key;
39
-	
40
-	/** 
41
-	 * 帐号创建的设备的ID
42
-	 **/
43
-	public $create_device_id;
44
-	
45
-	/** 
46
-	 * 账号创建时的位置
47
-	 **/
48
-	public $create_location;
49
-	
50
-	/** 
51
-	 * 展示名
52
-	 **/
53
-	public $display_name;
54
-	
55
-	/** 
56
-	 * 数据域
57
-	 **/
58
-	public $domain_id;
59
-	
60
-	/** 
61
-	 * 邮箱
62
-	 **/
63
-	public $email;
64
-	
65
-	/** 
66
-	 * 自定义扩展信息Map的Json格式
67
-	 **/
68
-	public $ext_infos;
69
-	
70
-	/** 
71
-	 * 1男 2女
72
-	 **/
73
-	public $gender;
74
-	
75
-	/** 
76
-	 * 记录创建时间
77
-	 **/
78
-	public $gmt_create;
79
-	
80
-	/** 
81
-	 * 记录上次更新时间
82
-	 **/
83
-	public $gmt_modified;
84
-	
85
-	/** 
86
-	 * Open Account Id
87
-	 **/
88
-	public $id;
89
-	
90
-	/** 
91
-	 * 开发者自定义账号id
92
-	 **/
93
-	public $isv_account_id;
94
-	
95
-	/** 
96
-	 * 地区
97
-	 **/
98
-	public $locale;
99
-	
100
-	/** 
101
-	 * 登录名
102
-	 **/
103
-	public $login_id;
104
-	
105
-	/** 
106
-	 * 密码
107
-	 **/
108
-	public $login_pwd;
109
-	
110
-	/** 
111
-	 * 加密算法类型:1、代表单纯MD5,2:代表单一Salt的MD5,3、代表根据记录不同后的MD5
112
-	 **/
113
-	public $login_pwd_encryption;
114
-	
115
-	/** 
116
-	 * 密码加密强度
117
-	 **/
118
-	public $login_pwd_intensity;
119
-	
120
-	/** 
121
-	 * 密码salt
122
-	 **/
123
-	public $login_pwd_salt;
124
-	
125
-	/** 
126
-	 * 手机
127
-	 **/
128
-	public $mobile;
129
-	
130
-	/** 
131
-	 * 姓名
132
-	 **/
133
-	public $name;
134
-	
135
-	/** 
136
-	 * TAOBAO = 1;WEIXIN = 2;WEIBO = 3;QQ = 4;
137
-	 **/
138
-	public $oauth_plateform;
139
-	
140
-	/** 
141
-	 * 第三方oauth openid
142
-	 **/
143
-	public $open_id;
144
-	
145
-	/** 
146
-	 * 账号状态:1、启用,2、删除,3、禁用
147
-	 **/
148
-	public $status;
149
-	
150
-	/** 
151
-	 * 账号创建类型:1、通过短信创建,2、ISV批量导入,3、ISV OAuth创建
152
-	 **/
153
-	public $type;
154
-	
155
-	/** 
156
-	 * 记录的版本号
157
-	 **/
158
-	public $version;
159
-	
160
-	/** 
161
-	 * 旺旺
162
-	 **/
163
-	public $wangwang;
164
-	
165
-	/** 
166
-	 * 微信
167
-	 **/
168
-	public $weixin;	
169
-}
170
-?>

+ 0 - 30
extend/taobaosdk/top/domain/OpenAccountResult.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 结果
5
- * @author auto create
6
- */
7
-class OpenAccountResult
8
-{
9
-	
10
-	/** 
11
-	 * 错误码
12
-	 **/
13
-	public $code;
14
-	
15
-	/** 
16
-	 * Open Account信息
17
-	 **/
18
-	public $data;
19
-	
20
-	/** 
21
-	 * 错误信息
22
-	 **/
23
-	public $message;
24
-	
25
-	/** 
26
-	 * 是否成功
27
-	 **/
28
-	public $successful;	
29
-}
30
-?>

+ 0 - 30
extend/taobaosdk/top/domain/OpenAccountSearchResult.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 搜索查询返回结果
5
- * @author auto create
6
- */
7
-class OpenAccountSearchResult
8
-{
9
-	
10
-	/** 
11
-	 * 状态码
12
-	 **/
13
-	public $code;
14
-	
15
-	/** 
16
-	 * OpenAccount的列表
17
-	 **/
18
-	public $datas;
19
-	
20
-	/** 
21
-	 * 状态信息
22
-	 **/
23
-	public $message;
24
-	
25
-	/** 
26
-	 * 查询是否成功,成功返回时有可能数据为空
27
-	 **/
28
-	public $successful;	
29
-}
30
-?>

+ 0 - 30
extend/taobaosdk/top/domain/OpenAccountTokenApplyResult.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * Open Account申请token的结果
5
- * @author auto create
6
- */
7
-class OpenAccountTokenApplyResult
8
-{
9
-	
10
-	/** 
11
-	 * 错误码
12
-	 **/
13
-	public $code;
14
-	
15
-	/** 
16
-	 * token
17
-	 **/
18
-	public $data;
19
-	
20
-	/** 
21
-	 * 错误信息
22
-	 **/
23
-	public $message;
24
-	
25
-	/** 
26
-	 * 是否成功
27
-	 **/
28
-	public $successful;	
29
-}
30
-?>

+ 0 - 30
extend/taobaosdk/top/domain/OpenAccountTokenValidateResult.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 验证token返回数据结构
5
- * @author auto create
6
- */
7
-class OpenAccountTokenValidateResult
8
-{
9
-	
10
-	/** 
11
-	 * 错误码
12
-	 **/
13
-	public $code;
14
-	
15
-	/** 
16
-	 * token中的数据
17
-	 **/
18
-	public $data;
19
-	
20
-	/** 
21
-	 * 错误信息
22
-	 **/
23
-	public $message;
24
-	
25
-	/** 
26
-	 * 是否成功
27
-	 **/
28
-	public $successful;	
29
-}
30
-?>

+ 0 - 30
extend/taobaosdk/top/domain/OpenaccountLong.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * Open Account模型
5
- * @author auto create
6
- */
7
-class OpenaccountLong
8
-{
9
-	
10
-	/** 
11
-	 * 返回码
12
-	 **/
13
-	public $code;
14
-	
15
-	/** 
16
-	 * 返回数据
17
-	 **/
18
-	public $data;
19
-	
20
-	/** 
21
-	 * 返回信息
22
-	 **/
23
-	public $message;
24
-	
25
-	/** 
26
-	 * 是否成功
27
-	 **/
28
-	public $successful;	
29
-}
30
-?>

+ 0 - 30
extend/taobaosdk/top/domain/OpenaccountObject.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * Open Account模型
5
- * @author auto create
6
- */
7
-class OpenaccountObject
8
-{
9
-	
10
-	/** 
11
-	 * 错误码
12
-	 **/
13
-	public $code;
14
-	
15
-	/** 
16
-	 * 返回数据
17
-	 **/
18
-	public $data;
19
-	
20
-	/** 
21
-	 * 返回信息
22
-	 **/
23
-	public $message;
24
-	
25
-	/** 
26
-	 * 是否成功
27
-	 **/
28
-	public $successful;	
29
-}
30
-?>

+ 0 - 25
extend/taobaosdk/top/domain/OpenaccountVoid.php

@@ -1,25 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * Open Account模型
5
- * @author auto create
6
- */
7
-class OpenaccountVoid
8
-{
9
-	
10
-	/** 
11
-	 * 错误码
12
-	 **/
13
-	public $code;
14
-	
15
-	/** 
16
-	 * 返回信息
17
-	 **/
18
-	public $message;
19
-	
20
-	/** 
21
-	 * 是否成功
22
-	 **/
23
-	public $successful;	
24
-}
25
-?>

+ 0 - 30
extend/taobaosdk/top/domain/OrderData.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 复购订单,仅适用于手淘拉新
5
- * @author auto create
6
- */
7
-class OrderData
8
-{
9
-	
10
-	/** 
11
-	 * 预估佣金
12
-	 **/
13
-	public $commission;
14
-	
15
-	/** 
16
-	 * 收货时间
17
-	 **/
18
-	public $confirm_receive_time;
19
-	
20
-	/** 
21
-	 * 订单号
22
-	 **/
23
-	public $order_no;
24
-	
25
-	/** 
26
-	 * 支付时间
27
-	 **/
28
-	public $pay_time;	
29
-}
30
-?>

+ 0 - 60
extend/taobaosdk/top/domain/PaginationResult.php

@@ -1,60 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 返回结果
5
- * @author auto create
6
- */
7
-class PaginationResult
8
-{
9
-	
10
-	/** 
11
-	 * 当前页码
12
-	 **/
13
-	public $current_page;
14
-	
15
-	/** 
16
-	 * 扩展属性
17
-	 **/
18
-	public $extend;
19
-	
20
-	/** 
21
-	 * 商品数据
22
-	 **/
23
-	public $model_list;
24
-	
25
-	/** 
26
-	 * 错误码
27
-	 **/
28
-	public $msg_code;
29
-	
30
-	/** 
31
-	 * 错误信息
32
-	 **/
33
-	public $msg_info;
34
-	
35
-	/** 
36
-	 * 一页大小
37
-	 **/
38
-	public $page_size;
39
-	
40
-	/** 
41
-	 * 请求是否成功
42
-	 **/
43
-	public $success;
44
-	
45
-	/** 
46
-	 * 商品总数
47
-	 **/
48
-	public $total_item;
49
-	
50
-	/** 
51
-	 * 总页数
52
-	 **/
53
-	public $total_page;
54
-	
55
-	/** 
56
-	 * 埋点信息
57
-	 **/
58
-	public $track_params;	
59
-}
60
-?>

+ 0 - 200
extend/taobaosdk/top/domain/Product.php

@@ -1,200 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 产品结构
5
- * @author auto create
6
- */
7
-class Product
8
-{
9
-	
10
-	/** 
11
-	 * 产品条码信息,仅在taobao.products.search接口且商城可用
12
-	 **/
13
-	public $barcode_str;
14
-	
15
-	/** 
16
-	 * 产品的非关键属性列表.格式:pid:vid;pid:vid.
17
-	 **/
18
-	public $binds;
19
-	
20
-	/** 
21
-	 * 产品的非关键属性字符串列表.格式同props_str(<strong>注:</strong><font color="red">属性名称中的冒号&quot;:&quot;被转换为:&quot;#cln#&quot;;  分号&quot;;&quot;被转换为:&quot;#scln#&quot;</font>)
22
-	 **/
23
-	public $binds_str;
24
-	
25
-	/** 
26
-	 * 商品类目名称
27
-	 **/
28
-	public $cat_name;
29
-	
30
-	/** 
31
-	 * 商品类目ID.必须是叶子类目ID
32
-	 **/
33
-	public $cid;
34
-	
35
-	/** 
36
-	 * 产品的collect次数(不提供数据,返回0)
37
-	 **/
38
-	public $collect_num;
39
-	
40
-	/** 
41
-	 * 品类ID
42
-	 **/
43
-	public $commodity_id;
44
-	
45
-	/** 
46
-	 * 创建时间.格式:yyyy-mm-dd hh:mm:ss
47
-	 **/
48
-	public $created;
49
-	
50
-	/** 
51
-	 * 标识是否为达尔文体系下的产品 。如果为空表示是非达尔文体系下的产品如果cspu:0 表示是达尔文体系下的产品,有cspu正在待小二审核,但不能发布商品。如果cspu:1 表示是达尔文体系下的产品,且有小二确认的cspu,能发布商品
52
-	 **/
53
-	public $cspu_feature;
54
-	
55
-	/** 
56
-	 * 用户自定义属性,结构:pid1:value1;pid2:value2 例如:&ldquo;20000:优衣库&rdquo;,表示&ldquo;品牌:优衣库&rdquo;
57
-	 **/
58
-	public $customer_props;
59
-	
60
-	/** 
61
-	 * 产品的描述.最大25000个字节
62
-	 **/
63
-	public $desc;
64
-	
65
-	/** 
66
-	 * 标识套装产品是否有效,无效的套装产品需要重新发布
67
-	 **/
68
-	public $is_suite_effective;
69
-	
70
-	/** 
71
-	 * 产品的级别level
72
-	 **/
73
-	public $level;
74
-	
75
-	/** 
76
-	 * 修改时间.格式:yyyy-mm-dd hh:mm:ss
77
-	 **/
78
-	public $modified;
79
-	
80
-	/** 
81
-	 * 产品名称
82
-	 **/
83
-	public $name;
84
-	
85
-	/** 
86
-	 * 外部产品ID
87
-	 **/
88
-	public $outer_id;
89
-	
90
-	/** 
91
-	 * 产品对应的图片路径
92
-	 **/
93
-	public $pic_path;
94
-	
95
-	/** 
96
-	 * 产品的主图片地址.(绝对地址,格式:http://host/image_path)
97
-	 **/
98
-	public $pic_url;
99
-	
100
-	/** 
101
-	 * 产品的市场价.单位为元.精确到2位小数;如:200.07
102
-	 **/
103
-	public $price;
104
-	
105
-	/** 
106
-	 * 产品扩展信息
107
-	 **/
108
-	public $product_extra_infos;
109
-	
110
-	/** 
111
-	 * 产品ID
112
-	 **/
113
-	public $product_id;
114
-	
115
-	/** 
116
-	 * 产品的子图片.目前最多支持4张。fields中设置为product_imgs.id、product_imgs.url、product_imgs.position 等形式就会返回相应的字段
117
-	 **/
118
-	public $product_imgs;
119
-	
120
-	/** 
121
-	 * 产品的属性图片.比如说黄色对应的产品图片,绿色对应的产品图片。fields中设置为product_prop_imgs.id、 product_prop_imgs.props、product_prop_imgs.url、product_prop_imgs.position等形式就会返回相应的字段
122
-	 **/
123
-	public $product_prop_imgs;
124
-	
125
-	/** 
126
-	 * 销售属性值别名。格式为pid1:vid1:alias1;pid1:vid2:alia2。
127
-	 **/
128
-	public $property_alias;
129
-	
130
-	/** 
131
-	 * 产品的关键属性列表.格式:pid:vid;pid:vid
132
-	 **/
133
-	public $props;
134
-	
135
-	/** 
136
-	 * 产品的关键属性字符串列表.比如:品牌:诺基亚;型号:N73(<strong>注:</strong><font color="red">属性名称中的冒号&quot;:&quot;被转换为:&quot;#cln#&quot;;  分号&quot;;&quot;被转换为:&quot;#scln#&quot;</font>)
137
-	 **/
138
-	public $props_str;
139
-	
140
-	/** 
141
-	 * 产品的评分次数
142
-	 **/
143
-	public $rate_num;
144
-	
145
-	/** 
146
-	 * 产品的销售量
147
-	 **/
148
-	public $sale_num;
149
-	
150
-	/** 
151
-	 * 产品的销售属性列表.格式:pid:vid;pid:vid
152
-	 **/
153
-	public $sale_props;
154
-	
155
-	/** 
156
-	 * 产品的销售属性字符串列表.格式同props_str(<strong>注:</strong><font color="red">属性名称中的冒号&quot;:&quot;被转换为:&quot;#cln#&quot;;  分号&quot;;&quot;被转换为:&quot;#scln#&quot;</font>)
157
-	 **/
158
-	public $sale_props_str;
159
-	
160
-	/** 
161
-	 * 产品卖点描述,长度限制20个汉字
162
-	 **/
163
-	public $sell_pt;
164
-	
165
-	/** 
166
-	 * 产品的店内价格
167
-	 **/
168
-	public $shop_price;
169
-	
170
-	/** 
171
-	 * 产品的标准价格
172
-	 **/
173
-	public $standard_price;
174
-	
175
-	/** 
176
-	 * 当前状态(0 商家确认 1 屏蔽 3 小二确认 2 未确认 -1 删除)
177
-	 **/
178
-	public $status;
179
-	
180
-	/** 
181
-	 * 套装产品关联的子规格,同时该字段不为空标识该产品是套装产品
182
-	 **/
183
-	public $suite_items_str;
184
-	
185
-	/** 
186
-	 * 模板ID
187
-	 **/
188
-	public $template_id;
189
-	
190
-	/** 
191
-	 * 淘宝标准产品编码
192
-	 **/
193
-	public $tsc;
194
-	
195
-	/** 
196
-	 * 垂直市场,如:3(3C),4(鞋城)
197
-	 **/
198
-	public $vertical_market;	
199
-}
200
-?>

+ 0 - 30
extend/taobaosdk/top/domain/ProductExtraInfo.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 产品扩展信息
5
- * @author auto create
6
- */
7
-class ProductExtraInfo
8
-{
9
-	
10
-	/** 
11
-	 * 产品扩展信息键
12
-	 **/
13
-	public $field_key;
14
-	
15
-	/** 
16
-	 * 产品扩展信息名称
17
-	 **/
18
-	public $field_name;
19
-	
20
-	/** 
21
-	 * 产品扩展信息简介
22
-	 **/
23
-	public $field_value;
24
-	
25
-	/** 
26
-	 * 产品ID
27
-	 **/
28
-	public $product_id;	
29
-}
30
-?>

+ 0 - 40
extend/taobaosdk/top/domain/ProductImg.php

@@ -1,40 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 产品图片
5
- * @author auto create
6
- */
7
-class ProductImg
8
-{
9
-	
10
-	/** 
11
-	 * 添加时间.格式:yyyy-mm-dd hh:mm:ss
12
-	 **/
13
-	public $created;
14
-	
15
-	/** 
16
-	 * 产品图片ID
17
-	 **/
18
-	public $id;
19
-	
20
-	/** 
21
-	 * 修改时间.格式:yyyy-mm-dd hh:mm:ss
22
-	 **/
23
-	public $modified;
24
-	
25
-	/** 
26
-	 * 图片序号。产品里的图片展示顺序,数据越小越靠前。要求是正整数。
27
-	 **/
28
-	public $position;
29
-	
30
-	/** 
31
-	 * 图片所属产品的ID
32
-	 **/
33
-	public $product_id;
34
-	
35
-	/** 
36
-	 * 图片地址.(绝对地址,格式:http://host/image_path)
37
-	 **/
38
-	public $url;	
39
-}
40
-?>

+ 0 - 45
extend/taobaosdk/top/domain/ProductPropImg.php

@@ -1,45 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 产品属性图片
5
- * @author auto create
6
- */
7
-class ProductPropImg
8
-{
9
-	
10
-	/** 
11
-	 * 添加时间.格式:yyyy-mm-dd hh:mm:ss
12
-	 **/
13
-	public $created;
14
-	
15
-	/** 
16
-	 * 产品属性图片ID
17
-	 **/
18
-	public $id;
19
-	
20
-	/** 
21
-	 * 修改时间.格式:yyyy-mm-dd hh:mm:ss
22
-	 **/
23
-	public $modified;
24
-	
25
-	/** 
26
-	 * 图片序号。产品里的图片展示顺序,数据越小越靠前。要求是正整数。
27
-	 **/
28
-	public $position;
29
-	
30
-	/** 
31
-	 * 图片所属产品的ID
32
-	 **/
33
-	public $product_id;
34
-	
35
-	/** 
36
-	 * 属性串(pid:vid),目前只有颜色属性.如:颜色:红色表示为 1627207:28326
37
-	 **/
38
-	public $props;
39
-	
40
-	/** 
41
-	 * 图片地址.(绝对地址,格式:http://host/image_path)
42
-	 **/
43
-	public $url;	
44
-}
45
-?>

+ 0 - 25
extend/taobaosdk/top/domain/PromotionExtend.php

@@ -1,25 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 权益扩展信息
5
- * @author auto create
6
- */
7
-class PromotionExtend
8
-{
9
-	
10
-	/** 
11
-	 * 权益链接
12
-	 **/
13
-	public $promotion_url;
14
-	
15
-	/** 
16
-	 * 权益推荐商品
17
-	 **/
18
-	public $recommend_item_list;
19
-	
20
-	/** 
21
-	 * 有价券信息
22
-	 **/
23
-	public $youjia_coupon_info;	
24
-}
25
-?>

+ 0 - 30
extend/taobaosdk/top/domain/PromotionList.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 权益信息
5
- * @author auto create
6
- */
7
-class PromotionList
8
-{
9
-	
10
-	/** 
11
-	 * 权益起用门槛,满X元可用,券场景为满元,精确到分,如满100元可用
12
-	 **/
13
-	public $entry_condition;
14
-	
15
-	/** 
16
-	 * 权益面额,券场景为减钱,精确到分
17
-	 **/
18
-	public $entry_discount;
19
-	
20
-	/** 
21
-	 * 权益结束时间,精确到毫秒时间戳
22
-	 **/
23
-	public $entry_used_end_time;
24
-	
25
-	/** 
26
-	 * 权益开始时间,精确到毫秒时间戳
27
-	 **/
28
-	public $entry_used_start_time;	
29
-}
30
-?>

+ 0 - 35
extend/taobaosdk/top/domain/PropImg.php

@@ -1,35 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 商品属性图片结构
5
- * @author auto create
6
- */
7
-class PropImg
8
-{
9
-	
10
-	/** 
11
-	 * 图片创建时间 时间格式:yyyy-MM-dd HH:mm:ss
12
-	 **/
13
-	public $created;
14
-	
15
-	/** 
16
-	 * 属性图片的id,和商品相对应
17
-	 **/
18
-	public $id;
19
-	
20
-	/** 
21
-	 * 图片放在第几张(多图时可设置)
22
-	 **/
23
-	public $position;
24
-	
25
-	/** 
26
-	 * 图片所对应的属性组合的字符串
27
-	 **/
28
-	public $properties;
29
-	
30
-	/** 
31
-	 * 图片链接地址
32
-	 **/
33
-	public $url;	
34
-}
35
-?>

+ 0 - 70
extend/taobaosdk/top/domain/PropValue.php

@@ -1,70 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 属性值
5
- * @author auto create
6
- */
7
-class PropValue
8
-{
9
-	
10
-	/** 
11
-	 * 类目ID
12
-	 **/
13
-	public $cid;
14
-	
15
-	/** 
16
-	 * 属性值feature
17
-	 **/
18
-	public $features;
19
-	
20
-	/** 
21
-	 * 是否为父类目属性
22
-	 **/
23
-	public $is_parent;
24
-	
25
-	/** 
26
-	 * 修改时间(类目增量专用)
27
-	 **/
28
-	public $modified_time;
29
-	
30
-	/** 
31
-	 * 三种枚举类型:modify,add,delete (增量类目专用)
32
-	 **/
33
-	public $modified_type;
34
-	
35
-	/** 
36
-	 * 属性值
37
-	 **/
38
-	public $name;
39
-	
40
-	/** 
41
-	 * 属性值别名
42
-	 **/
43
-	public $name_alias;
44
-	
45
-	/** 
46
-	 * 属性 ID
47
-	 **/
48
-	public $pid;
49
-	
50
-	/** 
51
-	 * 属性名
52
-	 **/
53
-	public $prop_name;
54
-	
55
-	/** 
56
-	 * 排列序号。取值范围:大于零的整数
57
-	 **/
58
-	public $sort_order;
59
-	
60
-	/** 
61
-	 * 状态。可选值:normal(正常),deleted(删除)
62
-	 **/
63
-	public $status;
64
-	
65
-	/** 
66
-	 * 属性值ID
67
-	 **/
68
-	public $vid;	
69
-}
70
-?>

+ 0 - 20
extend/taobaosdk/top/domain/RecommendItemList.php

@@ -1,20 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 权益推荐商品
5
- * @author auto create
6
- */
7
-class RecommendItemList
8
-{
9
-	
10
-	/** 
11
-	 * 权益推荐商品id
12
-	 **/
13
-	public $item_id;
14
-	
15
-	/** 
16
-	 * 商品链接
17
-	 **/
18
-	public $url;	
19
-}
20
-?>

+ 0 - 50
extend/taobaosdk/top/domain/RegisterInfoDto.php

@@ -1,50 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 线下备案专属信息
5
- * @author auto create
6
- */
7
-class RegisterInfoDto
8
-{
9
-	
10
-	/** 
11
-	 * 渠道独有 -经营类型
12
-	 **/
13
-	public $career;
14
-	
15
-	/** 
16
-	 * 渠道独有 -对应的证件证件类型编号
17
-	 **/
18
-	public $certify_number;
19
-	
20
-	/** 
21
-	 * 渠道独有 -详细地址
22
-	 **/
23
-	public $detail_address;
24
-	
25
-	/** 
26
-	 * 渠道独有 -地区
27
-	 **/
28
-	public $location;
29
-	
30
-	/** 
31
-	 * 渠道独有 -手机号码
32
-	 **/
33
-	public $phone_number;
34
-	
35
-	/** 
36
-	 * 渠道独有 -证件类型
37
-	 **/
38
-	public $shop_certify_type;
39
-	
40
-	/** 
41
-	 * 渠道独有 -店铺名称
42
-	 **/
43
-	public $shop_name;
44
-	
45
-	/** 
46
-	 * 渠道独有 -店铺类型
47
-	 **/
48
-	public $shop_type;	
49
-}
50
-?>

+ 0 - 30
extend/taobaosdk/top/domain/Result.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * result
5
- * @author auto create
6
- */
7
-class Result
8
-{
9
-	
10
-	/** 
11
-	 * model
12
-	 **/
13
-	public $model;
14
-	
15
-	/** 
16
-	 * msgCode
17
-	 **/
18
-	public $msg_code;
19
-	
20
-	/** 
21
-	 * msgInfo
22
-	 **/
23
-	public $msg_info;
24
-	
25
-	/** 
26
-	 * success
27
-	 **/
28
-	public $success;	
29
-}
30
-?>

+ 0 - 15
extend/taobaosdk/top/domain/Results.php

@@ -1,15 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * data
5
- * @author auto create
6
- */
7
-class Results
8
-{
9
-	
10
-	/** 
11
-	 * data
12
-	 **/
13
-	public $data;	
14
-}
15
-?>

+ 0 - 30
extend/taobaosdk/top/domain/RightsInstanceCreateResult.php

@@ -1,30 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * model
5
- * @author auto create
6
- */
7
-class RightsInstanceCreateResult
8
-{
9
-	
10
-	/** 
11
-	 * 创建完成后资金账户可用资金,单位元,保留2位小数
12
-	 **/
13
-	public $available_fee;
14
-	
15
-	/** 
16
-	 * 淘礼金Id
17
-	 **/
18
-	public $rights_id;
19
-	
20
-	/** 
21
-	 * 淘礼金领取Url
22
-	 **/
23
-	public $send_url;
24
-	
25
-	/** 
26
-	 * 投放code【百川商品详情页业务专用】
27
-	 **/
28
-	public $vegas_code;	
29
-}
30
-?>

文件差异内容过多而无法显示
+ 0 - 125
extend/taobaosdk/top/domain/Shipping.php


+ 0 - 120
extend/taobaosdk/top/domain/Sku.php

@@ -1,120 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * Sku结构
5
- * @author auto create
6
- */
7
-class Sku
8
-{
9
-	
10
-	/** 
11
-	 * 商品级别的条形码
12
-	 **/
13
-	public $barcode;
14
-	
15
-	/** 
16
-	 * 基础色数据
17
-	 **/
18
-	public $change_prop;
19
-	
20
-	/** 
21
-	 * sku创建日期 时间格式:yyyy-MM-dd HH:mm:ss
22
-	 **/
23
-	public $created;
24
-	
25
-	/** 
26
-	 * skuDeliveryTimeType
27
-	 **/
28
-	public $delivery_time_type;
29
-	
30
-	/** 
31
-	 * 扩展sku的id
32
-	 **/
33
-	public $extra_id;
34
-	
35
-	/** 
36
-	 * 
37
-	 **/
38
-	public $gmt_modified;
39
-	
40
-	/** 
41
-	 * sku所属商品id(注意:iid近期即将废弃,请用num_iid参数)
42
-	 **/
43
-	public $iid;
44
-	
45
-	/** 
46
-	 * 扩展sku的备注信息
47
-	 **/
48
-	public $memo;
49
-	
50
-	/** 
51
-	 * sku最后修改日期 时间格式:yyyy-MM-dd HH:mm:ss
52
-	 **/
53
-	public $modified;
54
-	
55
-	/** 
56
-	 * sku所属商品数字id
57
-	 **/
58
-	public $num_iid;
59
-	
60
-	/** 
61
-	 * 商家设置的外部id。天猫和集市的卖家,需要登录才能获取到自己的商家编码,不能获取到他人的商家编码。
62
-	 **/
63
-	public $outer_id;
64
-	
65
-	/** 
66
-	 * 属于这个sku的商品的价格 取值范围:0-100000000;精确到2位小数;单位:元。如:200.07,表示:200元7分。
67
-	 **/
68
-	public $price;
69
-	
70
-	/** 
71
-	 * sku的销售属性组合字符串(颜色,大小,等等,可通过类目API获取某类目下的销售属性),格式是p1:v1;p2:v2
72
-	 **/
73
-	public $properties;
74
-	
75
-	/** 
76
-	 * sku所对应的销售属性的中文名字串,格式如:pid1:vid1:pid_name1:vid_name1;pid2:vid2:pid_name2:vid_name2&hellip;&hellip;
77
-	 **/
78
-	public $properties_name;
79
-	
80
-	/** 
81
-	 * 属于这个sku的商品的数量,
82
-	 **/
83
-	public $quantity;
84
-	
85
-	/** 
86
-	 * sku级别发货时间
87
-	 **/
88
-	public $sku_delivery_time;
89
-	
90
-	/** 
91
-	 * skuFeature
92
-	 **/
93
-	public $sku_feature;
94
-	
95
-	/** 
96
-	 * sku的id
97
-	 **/
98
-	public $sku_id;
99
-	
100
-	/** 
101
-	 * 表示SKu上的产品规格信息
102
-	 **/
103
-	public $sku_spec_id;
104
-	
105
-	/** 
106
-	 * specId
107
-	 **/
108
-	public $spec_id;
109
-	
110
-	/** 
111
-	 * sku状态。 normal:正常 ;delete:删除,淘宝天猫此字段无效
112
-	 **/
113
-	public $status;
114
-	
115
-	/** 
116
-	 * 商品在付款减库存的状态下,该sku上未付款的订单数量
117
-	 **/
118
-	public $with_hold_quantity;	
119
-}
120
-?>

+ 0 - 70
extend/taobaosdk/top/domain/TljInstanceReportDto.php

@@ -1,70 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * model
5
- * @author auto create
6
- */
7
-class TljInstanceReportDto
8
-{
9
-	
10
-	/** 
11
-	 * 引导成交金额
12
-	 **/
13
-	public $alipay_amount;
14
-	
15
-	/** 
16
-	 * 退款红包金额
17
-	 **/
18
-	public $fp_refund_amount;
19
-	
20
-	/** 
21
-	 * 退款红包个数
22
-	 **/
23
-	public $fp_refund_num;
24
-	
25
-	/** 
26
-	 * 引导预估佣金金额
27
-	 **/
28
-	public $pre_commission_amount;
29
-	
30
-	/** 
31
-	 * 失效回退金额
32
-	 **/
33
-	public $refund_amount;
34
-	
35
-	/** 
36
-	 * 失效回退红包个数
37
-	 **/
38
-	public $refund_num;
39
-	
40
-	/** 
41
-	 * 解冻金额
42
-	 **/
43
-	public $unfreeze_amount;
44
-	
45
-	/** 
46
-	 * 解冻红包个数
47
-	 **/
48
-	public $unfreeze_num;
49
-	
50
-	/** 
51
-	 * 红包核销金额
52
-	 **/
53
-	public $use_amount;
54
-	
55
-	/** 
56
-	 * 红包核销个数
57
-	 **/
58
-	public $use_num;
59
-	
60
-	/** 
61
-	 * 红包领取金额
62
-	 **/
63
-	public $win_amount;
64
-	
65
-	/** 
66
-	 * 红包领取个数
67
-	 **/
68
-	public $win_num;	
69
-}
70
-?>

+ 0 - 40
extend/taobaosdk/top/domain/TokenInfo.php

@@ -1,40 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * token信息
5
- * @author auto create
6
- */
7
-class TokenInfo
8
-{
9
-	
10
-	/** 
11
-	 * token info扩展信息
12
-	 **/
13
-	public $ext;
14
-	
15
-	/** 
16
-	 * isv自己账号的唯一id
17
-	 **/
18
-	public $isv_account_id;
19
-	
20
-	/** 
21
-	 * ISV APP的登录态时长
22
-	 **/
23
-	public $login_state_expire_in;
24
-	
25
-	/** 
26
-	 * open account id
27
-	 **/
28
-	public $open_account_id;
29
-	
30
-	/** 
31
-	 * 时间戳
32
-	 **/
33
-	public $timestamp;
34
-	
35
-	/** 
36
-	 * 用于防重放的唯一id
37
-	 **/
38
-	public $uuid;	
39
-}
40
-?>

+ 0 - 20
extend/taobaosdk/top/domain/TokenInfoExt.php

@@ -1,20 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * token info中的扩展字段
5
- * @author auto create
6
- */
7
-class TokenInfoExt
8
-{
9
-	
10
-	/** 
11
-	 * 授权登录后返回的信息
12
-	 **/
13
-	public $oauth_other_info;
14
-	
15
-	/** 
16
-	 * open account当前token info中open account id对应的open account信息
17
-	 **/
18
-	public $open_account;	
19
-}
20
-?>

+ 0 - 25
extend/taobaosdk/top/domain/TopDownloadRecordDo.php

@@ -1,25 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * results
5
- * @author auto create
6
- */
7
-class TopDownloadRecordDo
8
-{
9
-	
10
-	/** 
11
-	 * 文件创建时间
12
-	 **/
13
-	public $created;
14
-	
15
-	/** 
16
-	 * 下载链接状态。1:未下载。2:已下载
17
-	 **/
18
-	public $status;
19
-	
20
-	/** 
21
-	 * 下载链接
22
-	 **/
23
-	public $url;	
24
-}
25
-?>

+ 0 - 45
extend/taobaosdk/top/domain/TopItemQuery.php

@@ -1,45 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * query
5
- * @author auto create
6
- */
7
-class TopItemQuery
8
-{
9
-	
10
-	/** 
11
-	 * 页码,必传
12
-	 **/
13
-	public $current_page;
14
-	
15
-	/** 
16
-	 * 一页大小,必传
17
-	 **/
18
-	public $page_size;
19
-	
20
-	/** 
21
-	 * 媒体pid,必传
22
-	 **/
23
-	public $pid;
24
-	
25
-	/** 
26
-	 * 是否包邮,可不传
27
-	 **/
28
-	public $postage;
29
-	
30
-	/** 
31
-	 * 状态,预热:1,正在进行中:2,可不传
32
-	 **/
33
-	public $status;
34
-	
35
-	/** 
36
-	 * 淘宝类目id,可不传
37
-	 **/
38
-	public $taobao_category_id;
39
-	
40
-	/** 
41
-	 * 搜索关键词,可不传
42
-	 **/
43
-	public $word;	
44
-}
45
-?>

+ 0 - 15
extend/taobaosdk/top/domain/Trackparams.php

@@ -1,15 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 埋点信息
5
- * @author auto create
6
- */
7
-class Trackparams
8
-{
9
-	
10
-	/** 
11
-	 * empty
12
-	 **/
13
-	public $empty;	
14
-}
15
-?>

+ 0 - 25
extend/taobaosdk/top/domain/TradeConfirmFee.php

@@ -1,25 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 确认收货费用结构
5
- * @author auto create
6
- */
7
-class TradeConfirmFee
8
-{
9
-	
10
-	/** 
11
-	 * 确认收货的金额(不包含邮费)。精确到2位小数;单位:元。如:200.07,表示:200元7分
12
-	 **/
13
-	public $confirm_fee;
14
-	
15
-	/** 
16
-	 * 需确认收货的邮费,当不是最后一笔收货或者没有邮费时是0.00。精确到2位小数;单位:元。如:200.07,表示:200元7分
17
-	 **/
18
-	public $confirm_post_fee;
19
-	
20
-	/** 
21
-	 * 是否是最后一笔订单(只对子订单有效,当其他子订单都是交易完成时,返回true,否则false)
22
-	 **/
23
-	public $is_last_order;	
24
-}
25
-?>

+ 0 - 55
extend/taobaosdk/top/domain/UploadTokenRequestV.php

@@ -1,55 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 系统自动生成
5
- * @author auto create
6
- */
7
-class UploadTokenRequestV
8
-{
9
-	
10
-	/** 
11
-	 * 多媒体中心分配的业务码, mtopupload或其他
12
-	 **/
13
-	public $biz_code;
14
-	
15
-	/** 
16
-	 * 客户端IP
17
-	 **/
18
-	public $client_ip;
19
-	
20
-	/** 
21
-	 * 客户端网络类型 wifi 或 2g 或 3g 或 cdma 或 gprs
22
-	 **/
23
-	public $client_net_type;
24
-	
25
-	/** 
26
-	 * 文件内容的CRC32校验和
27
-	 **/
28
-	public $crc;
29
-	
30
-	/** 
31
-	 * 文件名
32
-	 **/
33
-	public $file_name;
34
-	
35
-	/** 
36
-	 * 文件大小,单位byte
37
-	 **/
38
-	public $file_size;
39
-	
40
-	/** 
41
-	 * 自定义数据
42
-	 **/
43
-	public $private_data;
44
-	
45
-	/** 
46
-	 * 上传类型:resumable 或 normal
47
-	 **/
48
-	public $upload_type;
49
-	
50
-	/** 
51
-	 * session
52
-	 **/
53
-	public $user_id;	
54
-}
55
-?>

+ 0 - 45
extend/taobaosdk/top/domain/Video.php

@@ -1,45 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 商品视频关联记录
5
- * @author auto create
6
- */
7
-class Video
8
-{
9
-	
10
-	/** 
11
-	 * 视频关联记录创建时间(格式:yyyy-MM-dd HH:mm:ss)
12
-	 **/
13
-	public $created;
14
-	
15
-	/** 
16
-	 * 视频关联记录的id,和商品相对应
17
-	 **/
18
-	public $id;
19
-	
20
-	/** 
21
-	 * 视频记录关联的商品的数字id(注意:iid近期即将废弃,请用num_iid参数)
22
-	 **/
23
-	public $iid;
24
-	
25
-	/** 
26
-	 * 视频关联记录修改时间(格式:yyyy-MM-dd HH:mm:ss)
27
-	 **/
28
-	public $modified;
29
-	
30
-	/** 
31
-	 * 视频记录所关联的商品的数字id
32
-	 **/
33
-	public $num_iid;
34
-	
35
-	/** 
36
-	 * video的url连接地址。淘秀里视频记录里面存储的url地址
37
-	 **/
38
-	public $url;
39
-	
40
-	/** 
41
-	 * video的id,对应于视频在淘秀的存储记录
42
-	 **/
43
-	public $video_id;	
44
-}
45
-?>

+ 0 - 20
extend/taobaosdk/top/domain/WordMapData.php

@@ -1,20 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 商品信息-商品关联词
5
- * @author auto create
6
- */
7
-class WordMapData
8
-{
9
-	
10
-	/** 
11
-	 * 链接-商品相关关联词落地页地址
12
-	 **/
13
-	public $url;
14
-	
15
-	/** 
16
-	 * 商品相关的关联词
17
-	 **/
18
-	public $word;	
19
-}
20
-?>

+ 0 - 20
extend/taobaosdk/top/domain/Youjiacouponinfo.php

@@ -1,20 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * 有价券信息
5
- * @author auto create
6
- */
7
-class Youjiacouponinfo
8
-{
9
-	
10
-	/** 
11
-	 * 有价券商品id
12
-	 **/
13
-	public $item_id;
14
-	
15
-	/** 
16
-	 * 商品链接
17
-	 **/
18
-	public $url;	
19
-}
20
-?>

+ 0 - 26
extend/taobaosdk/top/fileTest.php

@@ -1,26 +0,0 @@
1
-<?php
2
-    include "TopSdk.php";
3
-    date_default_timezone_set('Asia/Shanghai'); 
4
-
5
-    $c = new TopClient;
6
-    $c->appkey = '***********';
7
-    $c->secretKey = '*************************';
8
-    // $req = new TradeVoucherUploadRequest;
9
-    // $req->setFileName("example");
10
-    // $req->setFileData("@/Users/xt/Downloads/1.jpg");
11
-    // $req->setSellerNick("奥利奥官方旗舰店");
12
-    // $req->setBuyerNick("101NufynDYcbjf2cFQD123j8M/mjtyz6RoxQ2OL1c0e/Bcasdfasdasdfasdfas");
13
-    // var_dump($c->execute($req));
14
-
15
-    $req2 = new TradeVoucherUploadRequest;
16
-    $req2->setFileName("example");
17
-
18
-    $myPic = array(
19
-            'type' => 'application/octet-stream',
20
-            'content' => file_get_contents('/Users/xt/Downloads/1.jpg')
21
-            );
22
-    $req2->setFileData($myPic);
23
-    $req2->setSellerNick("奥利奥官方旗舰店");
24
-    $req2->setBuyerNick("101NufynDYcbjf2cFQD123j8M/mjtyz6RoxQ2OL1c0e/Bcasdfasdasdfasdfas");
25
-    var_dump($c->execute($req2));
26
-?>

+ 0 - 32
extend/taobaosdk/top/request/AppipGetRequest.php

@@ -1,32 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.appip.get request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2020.08.28
7
- */
8
-class AppipGetRequest
9
-{
10
-	
11
-	private $apiParas = array();
12
-	
13
-	public function getApiMethodName()
14
-	{
15
-		return "taobao.appip.get";
16
-	}
17
-	
18
-	public function getApiParas()
19
-	{
20
-		return $this->apiParas;
21
-	}
22
-	
23
-	public function check()
24
-	{
25
-		
26
-	}
27
-	
28
-	public function putOtherTextParam($key, $value) {
29
-		$this->apiParas[$key] = $value;
30
-		$this->$key = $value;
31
-	}
32
-}

+ 0 - 48
extend/taobaosdk/top/request/AreasGetRequest.php

@@ -1,48 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.areas.get request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2020.11.17
7
- */
8
-class AreasGetRequest
9
-{
10
-	/** 
11
-	 * 需返回的字段列表.可选值:Area 结构中的所有字段;多个字段之间用","分隔.如:id,type,name,parent_id,zip.
12
-	 **/
13
-	private $fields;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setFields($fields)
18
-	{
19
-		$this->fields = $fields;
20
-		$this->apiParas["fields"] = $fields;
21
-	}
22
-
23
-	public function getFields()
24
-	{
25
-		return $this->fields;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.areas.get";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-		RequestCheckUtil::checkNotNull($this->fields,"fields");
42
-	}
43
-	
44
-	public function putOtherTextParam($key, $value) {
45
-		$this->apiParas[$key] = $value;
46
-		$this->$key = $value;
47
-	}
48
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanOpenaccountLoginRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.openaccount.login request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanOpenaccountLoginRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.openaccount.login";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanOpenaccountLoginbytokenRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.openaccount.loginbytoken request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanOpenaccountLoginbytokenRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.openaccount.loginbytoken";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanOpenaccountLogindoublecheckRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.openaccount.logindoublecheck request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanOpenaccountLogindoublecheckRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.openaccount.logindoublecheck";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanOpenaccountNewlogindoublecheckRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.openaccount.newlogindoublecheck request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanOpenaccountNewlogindoublecheckRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.openaccount.newlogindoublecheck";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanOpenaccountPasswordResetRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.openaccount.password.reset request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanOpenaccountPasswordResetRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.openaccount.password.reset";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanOpenaccountRegisterRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.openaccount.register request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanOpenaccountRegisterRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.openaccount.register";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanOpenaccountRegistercodeCheckRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.openaccount.registercode.check request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanOpenaccountRegistercodeCheckRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.openaccount.registercode.check";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanOpenaccountRegistercodeSendRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.openaccount.registercode.send request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanOpenaccountRegistercodeSendRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.openaccount.registercode.send";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanOpenaccountResetcodeCheckRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.openaccount.resetcode.check request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanOpenaccountResetcodeCheckRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.openaccount.resetcode.check";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanOpenaccountResetcodeSendRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.openaccount.resetcode.send request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanOpenaccountResetcodeSendRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.openaccount.resetcode.send";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanOrderurlGetRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.orderurl.get request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanOrderurlGetRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.orderurl.get";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanPayresultQueryRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.payresult.query request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanPayresultQueryRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.payresult.query";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanTaokeTraceRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.taoke.trace request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanTaokeTraceRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.taoke.trace";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanUserLoginRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.user.login request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanUserLoginRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.user.login";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanUserLoginbytokenRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.user.loginbytoken request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanUserLoginbytokenRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.user.loginbytoken";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 47
extend/taobaosdk/top/request/BaichuanUserLogindoublecheckRequest.php

@@ -1,47 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.baichuan.user.logindoublecheck request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class BaichuanUserLogindoublecheckRequest
9
-{
10
-	/** 
11
-	 * name
12
-	 **/
13
-	private $name;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setName($name)
18
-	{
19
-		$this->name = $name;
20
-		$this->apiParas["name"] = $name;
21
-	}
22
-
23
-	public function getName()
24
-	{
25
-		return $this->name;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.baichuan.user.logindoublecheck";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-	}
42
-	
43
-	public function putOtherTextParam($key, $value) {
44
-		$this->apiParas[$key] = $value;
45
-		$this->$key = $value;
46
-	}
47
-}

+ 0 - 82
extend/taobaosdk/top/request/CloudpushMessageAndroidRequest.php

@@ -1,82 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.cloudpush.message.android request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class CloudpushMessageAndroidRequest
9
-{
10
-	/** 
11
-	 * 发送的消息内容.
12
-	 **/
13
-	private $body;
14
-	
15
-	/** 
16
-	 * 推送目标: device:推送给设备; account:推送给指定帐号,all: 推送给全部
17
-	 **/
18
-	private $target;
19
-	
20
-	/** 
21
-	 * 根据Target来设定,如Target=device, 则对应的值为 设备id1,设备id2. 多个值使用逗号分隔
22
-	 **/
23
-	private $targetValue;
24
-	
25
-	private $apiParas = array();
26
-	
27
-	public function setBody($body)
28
-	{
29
-		$this->body = $body;
30
-		$this->apiParas["body"] = $body;
31
-	}
32
-
33
-	public function getBody()
34
-	{
35
-		return $this->body;
36
-	}
37
-
38
-	public function setTarget($target)
39
-	{
40
-		$this->target = $target;
41
-		$this->apiParas["target"] = $target;
42
-	}
43
-
44
-	public function getTarget()
45
-	{
46
-		return $this->target;
47
-	}
48
-
49
-	public function setTargetValue($targetValue)
50
-	{
51
-		$this->targetValue = $targetValue;
52
-		$this->apiParas["target_value"] = $targetValue;
53
-	}
54
-
55
-	public function getTargetValue()
56
-	{
57
-		return $this->targetValue;
58
-	}
59
-
60
-	public function getApiMethodName()
61
-	{
62
-		return "taobao.cloudpush.message.android";
63
-	}
64
-	
65
-	public function getApiParas()
66
-	{
67
-		return $this->apiParas;
68
-	}
69
-	
70
-	public function check()
71
-	{
72
-		
73
-		RequestCheckUtil::checkNotNull($this->body,"body");
74
-		RequestCheckUtil::checkNotNull($this->target,"target");
75
-		RequestCheckUtil::checkNotNull($this->targetValue,"targetValue");
76
-	}
77
-	
78
-	public function putOtherTextParam($key, $value) {
79
-		$this->apiParas[$key] = $value;
80
-		$this->$key = $value;
81
-	}
82
-}

+ 0 - 82
extend/taobaosdk/top/request/CloudpushMessageIosRequest.php

@@ -1,82 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.cloudpush.message.ios request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class CloudpushMessageIosRequest
9
-{
10
-	/** 
11
-	 * 发送的消息内容.
12
-	 **/
13
-	private $body;
14
-	
15
-	/** 
16
-	 * 推送目标: device:推送给设备; account:推送给指定帐号,all: 推送给全部
17
-	 **/
18
-	private $target;
19
-	
20
-	/** 
21
-	 * 根据Target来设定,如Target=device, 则对应的值为 设备id1,设备id2. 多个值使用逗号分隔
22
-	 **/
23
-	private $targetValue;
24
-	
25
-	private $apiParas = array();
26
-	
27
-	public function setBody($body)
28
-	{
29
-		$this->body = $body;
30
-		$this->apiParas["body"] = $body;
31
-	}
32
-
33
-	public function getBody()
34
-	{
35
-		return $this->body;
36
-	}
37
-
38
-	public function setTarget($target)
39
-	{
40
-		$this->target = $target;
41
-		$this->apiParas["target"] = $target;
42
-	}
43
-
44
-	public function getTarget()
45
-	{
46
-		return $this->target;
47
-	}
48
-
49
-	public function setTargetValue($targetValue)
50
-	{
51
-		$this->targetValue = $targetValue;
52
-		$this->apiParas["target_value"] = $targetValue;
53
-	}
54
-
55
-	public function getTargetValue()
56
-	{
57
-		return $this->targetValue;
58
-	}
59
-
60
-	public function getApiMethodName()
61
-	{
62
-		return "taobao.cloudpush.message.ios";
63
-	}
64
-	
65
-	public function getApiParas()
66
-	{
67
-		return $this->apiParas;
68
-	}
69
-	
70
-	public function check()
71
-	{
72
-		
73
-		RequestCheckUtil::checkNotNull($this->body,"body");
74
-		RequestCheckUtil::checkNotNull($this->target,"target");
75
-		RequestCheckUtil::checkNotNull($this->targetValue,"targetValue");
76
-	}
77
-	
78
-	public function putOtherTextParam($key, $value) {
79
-		$this->apiParas[$key] = $value;
80
-		$this->$key = $value;
81
-	}
82
-}

+ 0 - 99
extend/taobaosdk/top/request/CloudpushNoticeAndroidRequest.php

@@ -1,99 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.cloudpush.notice.android request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class CloudpushNoticeAndroidRequest
9
-{
10
-	/** 
11
-	 * 通知摘要
12
-	 **/
13
-	private $summary;
14
-	
15
-	/** 
16
-	 * 推送目标: device:推送给设备; account:推送给指定帐号,all: 推送给全部
17
-	 **/
18
-	private $target;
19
-	
20
-	/** 
21
-	 * 根据Target来设定,如Target=device, 则对应的值为 设备id1,设备id2. 多个值使用逗号分隔
22
-	 **/
23
-	private $targetValue;
24
-	
25
-	/** 
26
-	 * 通知的标题.
27
-	 **/
28
-	private $title;
29
-	
30
-	private $apiParas = array();
31
-	
32
-	public function setSummary($summary)
33
-	{
34
-		$this->summary = $summary;
35
-		$this->apiParas["summary"] = $summary;
36
-	}
37
-
38
-	public function getSummary()
39
-	{
40
-		return $this->summary;
41
-	}
42
-
43
-	public function setTarget($target)
44
-	{
45
-		$this->target = $target;
46
-		$this->apiParas["target"] = $target;
47
-	}
48
-
49
-	public function getTarget()
50
-	{
51
-		return $this->target;
52
-	}
53
-
54
-	public function setTargetValue($targetValue)
55
-	{
56
-		$this->targetValue = $targetValue;
57
-		$this->apiParas["target_value"] = $targetValue;
58
-	}
59
-
60
-	public function getTargetValue()
61
-	{
62
-		return $this->targetValue;
63
-	}
64
-
65
-	public function setTitle($title)
66
-	{
67
-		$this->title = $title;
68
-		$this->apiParas["title"] = $title;
69
-	}
70
-
71
-	public function getTitle()
72
-	{
73
-		return $this->title;
74
-	}
75
-
76
-	public function getApiMethodName()
77
-	{
78
-		return "taobao.cloudpush.notice.android";
79
-	}
80
-	
81
-	public function getApiParas()
82
-	{
83
-		return $this->apiParas;
84
-	}
85
-	
86
-	public function check()
87
-	{
88
-		
89
-		RequestCheckUtil::checkNotNull($this->summary,"summary");
90
-		RequestCheckUtil::checkNotNull($this->target,"target");
91
-		RequestCheckUtil::checkNotNull($this->targetValue,"targetValue");
92
-		RequestCheckUtil::checkNotNull($this->title,"title");
93
-	}
94
-	
95
-	public function putOtherTextParam($key, $value) {
96
-		$this->apiParas[$key] = $value;
97
-		$this->$key = $value;
98
-	}
99
-}

+ 0 - 115
extend/taobaosdk/top/request/CloudpushNoticeIosRequest.php

@@ -1,115 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.cloudpush.notice.ios request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.26
7
- */
8
-class CloudpushNoticeIosRequest
9
-{
10
-	/** 
11
-	 * iOS的通知是通过APNS中心来发送的,需要填写对应的环境信息.  DEV:表示开发环境, PRODUCT: 表示生产环境.
12
-	 **/
13
-	private $env;
14
-	
15
-	/** 
16
-	 * 提供给IOS通知的扩展属性,如角标或者声音等,注意:参数值为json
17
-	 **/
18
-	private $ext;
19
-	
20
-	/** 
21
-	 * 通知摘要
22
-	 **/
23
-	private $summary;
24
-	
25
-	/** 
26
-	 * 推送目标: device:推送给设备; account:推送给指定帐号,all: 推送给全部
27
-	 **/
28
-	private $target;
29
-	
30
-	/** 
31
-	 * 根据Target来设定,如Target=device, 则对应的值为 设备id1,设备id2. 多个值使用逗号分隔
32
-	 **/
33
-	private $targetValue;
34
-	
35
-	private $apiParas = array();
36
-	
37
-	public function setEnv($env)
38
-	{
39
-		$this->env = $env;
40
-		$this->apiParas["env"] = $env;
41
-	}
42
-
43
-	public function getEnv()
44
-	{
45
-		return $this->env;
46
-	}
47
-
48
-	public function setExt($ext)
49
-	{
50
-		$this->ext = $ext;
51
-		$this->apiParas["ext"] = $ext;
52
-	}
53
-
54
-	public function getExt()
55
-	{
56
-		return $this->ext;
57
-	}
58
-
59
-	public function setSummary($summary)
60
-	{
61
-		$this->summary = $summary;
62
-		$this->apiParas["summary"] = $summary;
63
-	}
64
-
65
-	public function getSummary()
66
-	{
67
-		return $this->summary;
68
-	}
69
-
70
-	public function setTarget($target)
71
-	{
72
-		$this->target = $target;
73
-		$this->apiParas["target"] = $target;
74
-	}
75
-
76
-	public function getTarget()
77
-	{
78
-		return $this->target;
79
-	}
80
-
81
-	public function setTargetValue($targetValue)
82
-	{
83
-		$this->targetValue = $targetValue;
84
-		$this->apiParas["target_value"] = $targetValue;
85
-	}
86
-
87
-	public function getTargetValue()
88
-	{
89
-		return $this->targetValue;
90
-	}
91
-
92
-	public function getApiMethodName()
93
-	{
94
-		return "taobao.cloudpush.notice.ios";
95
-	}
96
-	
97
-	public function getApiParas()
98
-	{
99
-		return $this->apiParas;
100
-	}
101
-	
102
-	public function check()
103
-	{
104
-		
105
-		RequestCheckUtil::checkNotNull($this->env,"env");
106
-		RequestCheckUtil::checkNotNull($this->summary,"summary");
107
-		RequestCheckUtil::checkNotNull($this->target,"target");
108
-		RequestCheckUtil::checkNotNull($this->targetValue,"targetValue");
109
-	}
110
-	
111
-	public function putOtherTextParam($key, $value) {
112
-		$this->apiParas[$key] = $value;
113
-		$this->$key = $value;
114
-	}
115
-}

文件差异内容过多而无法显示
+ 0 - 374
extend/taobaosdk/top/request/CloudpushPushRequest.php


文件差异内容过多而无法显示
+ 0 - 320
extend/taobaosdk/top/request/DeliverySendRequest.php


+ 0 - 81
extend/taobaosdk/top/request/FilesGetRequest.php

@@ -1,81 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.files.get request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.25
7
- */
8
-class FilesGetRequest
9
-{
10
-	/** 
11
-	 * 搜索结束时间
12
-	 **/
13
-	private $endDate;
14
-	
15
-	/** 
16
-	 * 搜索开始时间
17
-	 **/
18
-	private $startDate;
19
-	
20
-	/** 
21
-	 * 下载链接状态。1:未下载。2:已下载
22
-	 **/
23
-	private $status;
24
-	
25
-	private $apiParas = array();
26
-	
27
-	public function setEndDate($endDate)
28
-	{
29
-		$this->endDate = $endDate;
30
-		$this->apiParas["end_date"] = $endDate;
31
-	}
32
-
33
-	public function getEndDate()
34
-	{
35
-		return $this->endDate;
36
-	}
37
-
38
-	public function setStartDate($startDate)
39
-	{
40
-		$this->startDate = $startDate;
41
-		$this->apiParas["start_date"] = $startDate;
42
-	}
43
-
44
-	public function getStartDate()
45
-	{
46
-		return $this->startDate;
47
-	}
48
-
49
-	public function setStatus($status)
50
-	{
51
-		$this->status = $status;
52
-		$this->apiParas["status"] = $status;
53
-	}
54
-
55
-	public function getStatus()
56
-	{
57
-		return $this->status;
58
-	}
59
-
60
-	public function getApiMethodName()
61
-	{
62
-		return "taobao.files.get";
63
-	}
64
-	
65
-	public function getApiParas()
66
-	{
67
-		return $this->apiParas;
68
-	}
69
-	
70
-	public function check()
71
-	{
72
-		
73
-		RequestCheckUtil::checkNotNull($this->endDate,"endDate");
74
-		RequestCheckUtil::checkNotNull($this->startDate,"startDate");
75
-	}
76
-	
77
-	public function putOtherTextParam($key, $value) {
78
-		$this->apiParas[$key] = $value;
79
-		$this->$key = $value;
80
-	}
81
-}

+ 0 - 32
extend/taobaosdk/top/request/HttpdnsGetRequest.php

@@ -1,32 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.httpdns.get request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2018.07.25
7
- */
8
-class HttpdnsGetRequest
9
-{
10
-	
11
-	private $apiParas = array();
12
-	
13
-	public function getApiMethodName()
14
-	{
15
-		return "taobao.httpdns.get";
16
-	}
17
-	
18
-	public function getApiParas()
19
-	{
20
-		return $this->apiParas;
21
-	}
22
-	
23
-	public function check()
24
-	{
25
-		
26
-	}
27
-	
28
-	public function putOtherTextParam($key, $value) {
29
-		$this->apiParas[$key] = $value;
30
-		$this->$key = $value;
31
-	}
32
-}

文件差异内容过多而无法显示
+ 0 - 2073
extend/taobaosdk/top/request/ItemAddRequest.php


+ 0 - 83
extend/taobaosdk/top/request/ItemImgDeleteRequest.php

@@ -1,83 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.item.img.delete request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2019.03.29
7
- */
8
-class ItemImgDeleteRequest
9
-{
10
-	/** 
11
-	 * 商品图片ID;如果是竖图,请将id的值设置为1
12
-	 **/
13
-	private $id;
14
-	
15
-	/** 
16
-	 * 标记是否要删除第6张图,因为第6张图与普通商品图片不是存储在同一个位置的无图片ID,所以要通过一个标记来判断是否为第6张图,目前第6张图业务主要用在女装业务下
17
-	 **/
18
-	private $isSixthPic;
19
-	
20
-	/** 
21
-	 * 商品数字ID
22
-	 **/
23
-	private $numIid;
24
-	
25
-	private $apiParas = array();
26
-	
27
-	public function setId($id)
28
-	{
29
-		$this->id = $id;
30
-		$this->apiParas["id"] = $id;
31
-	}
32
-
33
-	public function getId()
34
-	{
35
-		return $this->id;
36
-	}
37
-
38
-	public function setIsSixthPic($isSixthPic)
39
-	{
40
-		$this->isSixthPic = $isSixthPic;
41
-		$this->apiParas["is_sixth_pic"] = $isSixthPic;
42
-	}
43
-
44
-	public function getIsSixthPic()
45
-	{
46
-		return $this->isSixthPic;
47
-	}
48
-
49
-	public function setNumIid($numIid)
50
-	{
51
-		$this->numIid = $numIid;
52
-		$this->apiParas["num_iid"] = $numIid;
53
-	}
54
-
55
-	public function getNumIid()
56
-	{
57
-		return $this->numIid;
58
-	}
59
-
60
-	public function getApiMethodName()
61
-	{
62
-		return "taobao.item.img.delete";
63
-	}
64
-	
65
-	public function getApiParas()
66
-	{
67
-		return $this->apiParas;
68
-	}
69
-	
70
-	public function check()
71
-	{
72
-		
73
-		RequestCheckUtil::checkNotNull($this->id,"id");
74
-		RequestCheckUtil::checkMinValue($this->id,1,"id");
75
-		RequestCheckUtil::checkNotNull($this->numIid,"numIid");
76
-		RequestCheckUtil::checkMinValue($this->numIid,1,"numIid");
77
-	}
78
-	
79
-	public function putOtherTextParam($key, $value) {
80
-		$this->apiParas[$key] = $value;
81
-		$this->$key = $value;
82
-	}
83
-}

+ 0 - 129
extend/taobaosdk/top/request/ItemImgUploadRequest.php

@@ -1,129 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.item.img.upload request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2020.04.20
7
- */
8
-class ItemImgUploadRequest
9
-{
10
-	/** 
11
-	 * 商品图片id(如果是更新图片,则需要传该参数)
12
-	 **/
13
-	private $id;
14
-	
15
-	/** 
16
-	 * 商品图片内容类型:JPG;最大:3M 。支持的文件类型:jpg,jpeg,png
17
-	 **/
18
-	private $image;
19
-	
20
-	/** 
21
-	 * 是否将该图片设为主图,可选值:true,false;默认值:false(非主图)
22
-	 **/
23
-	private $isMajor;
24
-	
25
-	/** 
26
-	 * 是否3:4长方形图片,绑定3:4主图视频时用于上传3:4商品主图
27
-	 **/
28
-	private $isRectangle;
29
-	
30
-	/** 
31
-	 * 商品数字ID,该参数必须
32
-	 **/
33
-	private $numIid;
34
-	
35
-	/** 
36
-	 * 图片序号
37
-	 **/
38
-	private $position;
39
-	
40
-	private $apiParas = array();
41
-	
42
-	public function setId($id)
43
-	{
44
-		$this->id = $id;
45
-		$this->apiParas["id"] = $id;
46
-	}
47
-
48
-	public function getId()
49
-	{
50
-		return $this->id;
51
-	}
52
-
53
-	public function setImage($image)
54
-	{
55
-		$this->image = $image;
56
-		$this->apiParas["image"] = $image;
57
-	}
58
-
59
-	public function getImage()
60
-	{
61
-		return $this->image;
62
-	}
63
-
64
-	public function setIsMajor($isMajor)
65
-	{
66
-		$this->isMajor = $isMajor;
67
-		$this->apiParas["is_major"] = $isMajor;
68
-	}
69
-
70
-	public function getIsMajor()
71
-	{
72
-		return $this->isMajor;
73
-	}
74
-
75
-	public function setIsRectangle($isRectangle)
76
-	{
77
-		$this->isRectangle = $isRectangle;
78
-		$this->apiParas["is_rectangle"] = $isRectangle;
79
-	}
80
-
81
-	public function getIsRectangle()
82
-	{
83
-		return $this->isRectangle;
84
-	}
85
-
86
-	public function setNumIid($numIid)
87
-	{
88
-		$this->numIid = $numIid;
89
-		$this->apiParas["num_iid"] = $numIid;
90
-	}
91
-
92
-	public function getNumIid()
93
-	{
94
-		return $this->numIid;
95
-	}
96
-
97
-	public function setPosition($position)
98
-	{
99
-		$this->position = $position;
100
-		$this->apiParas["position"] = $position;
101
-	}
102
-
103
-	public function getPosition()
104
-	{
105
-		return $this->position;
106
-	}
107
-
108
-	public function getApiMethodName()
109
-	{
110
-		return "taobao.item.img.upload";
111
-	}
112
-	
113
-	public function getApiParas()
114
-	{
115
-		return $this->apiParas;
116
-	}
117
-	
118
-	public function check()
119
-	{
120
-		
121
-		RequestCheckUtil::checkNotNull($this->numIid,"numIid");
122
-		RequestCheckUtil::checkMinValue($this->numIid,0,"numIid");
123
-	}
124
-	
125
-	public function putOtherTextParam($key, $value) {
126
-		$this->apiParas[$key] = $value;
127
-		$this->$key = $value;
128
-	}
129
-}

+ 0 - 130
extend/taobaosdk/top/request/ItemJointImgRequest.php

@@ -1,130 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.item.joint.img request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2019.11.08
7
- */
8
-class ItemJointImgRequest
9
-{
10
-	/** 
11
-	 * 商品图片id(如果是更新图片,则需要传该参数)
12
-	 **/
13
-	private $id;
14
-	
15
-	/** 
16
-	 * 上传的图片是否关联为商品主图
17
-	 **/
18
-	private $isMajor;
19
-	
20
-	/** 
21
-	 * 是否3:4长方形图片,绑定3:4主图视频时用于上传3:4商品主图
22
-	 **/
23
-	private $isRectangle;
24
-	
25
-	/** 
26
-	 * 商品数字ID,必选
27
-	 **/
28
-	private $numIid;
29
-	
30
-	/** 
31
-	 * 图片URL,图片空间图片的相对地址,支持的文件类型:jpg,jpeg,png
32
-	 **/
33
-	private $picPath;
34
-	
35
-	/** 
36
-	 * 图片序号
37
-	 **/
38
-	private $position;
39
-	
40
-	private $apiParas = array();
41
-	
42
-	public function setId($id)
43
-	{
44
-		$this->id = $id;
45
-		$this->apiParas["id"] = $id;
46
-	}
47
-
48
-	public function getId()
49
-	{
50
-		return $this->id;
51
-	}
52
-
53
-	public function setIsMajor($isMajor)
54
-	{
55
-		$this->isMajor = $isMajor;
56
-		$this->apiParas["is_major"] = $isMajor;
57
-	}
58
-
59
-	public function getIsMajor()
60
-	{
61
-		return $this->isMajor;
62
-	}
63
-
64
-	public function setIsRectangle($isRectangle)
65
-	{
66
-		$this->isRectangle = $isRectangle;
67
-		$this->apiParas["is_rectangle"] = $isRectangle;
68
-	}
69
-
70
-	public function getIsRectangle()
71
-	{
72
-		return $this->isRectangle;
73
-	}
74
-
75
-	public function setNumIid($numIid)
76
-	{
77
-		$this->numIid = $numIid;
78
-		$this->apiParas["num_iid"] = $numIid;
79
-	}
80
-
81
-	public function getNumIid()
82
-	{
83
-		return $this->numIid;
84
-	}
85
-
86
-	public function setPicPath($picPath)
87
-	{
88
-		$this->picPath = $picPath;
89
-		$this->apiParas["pic_path"] = $picPath;
90
-	}
91
-
92
-	public function getPicPath()
93
-	{
94
-		return $this->picPath;
95
-	}
96
-
97
-	public function setPosition($position)
98
-	{
99
-		$this->position = $position;
100
-		$this->apiParas["position"] = $position;
101
-	}
102
-
103
-	public function getPosition()
104
-	{
105
-		return $this->position;
106
-	}
107
-
108
-	public function getApiMethodName()
109
-	{
110
-		return "taobao.item.joint.img";
111
-	}
112
-	
113
-	public function getApiParas()
114
-	{
115
-		return $this->apiParas;
116
-	}
117
-	
118
-	public function check()
119
-	{
120
-		
121
-		RequestCheckUtil::checkNotNull($this->numIid,"numIid");
122
-		RequestCheckUtil::checkMinValue($this->numIid,0,"numIid");
123
-		RequestCheckUtil::checkNotNull($this->picPath,"picPath");
124
-	}
125
-	
126
-	public function putOtherTextParam($key, $value) {
127
-		$this->apiParas[$key] = $value;
128
-		$this->$key = $value;
129
-	}
130
-}

+ 0 - 115
extend/taobaosdk/top/request/ItemJointPropimgRequest.php

@@ -1,115 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.item.joint.propimg request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2019.04.10
7
- */
8
-class ItemJointPropimgRequest
9
-{
10
-	/** 
11
-	 * 属性图片ID。如果是新增不需要填写
12
-	 **/
13
-	private $id;
14
-	
15
-	/** 
16
-	 * 商品数字ID,必选
17
-	 **/
18
-	private $numIid;
19
-	
20
-	/** 
21
-	 * 图片地址(传入图片相对地址即可,即不需包含 http://img02.taobao.net/bao/uploaded )
22
-	 **/
23
-	private $picPath;
24
-	
25
-	/** 
26
-	 * 图片序号
27
-	 **/
28
-	private $position;
29
-	
30
-	/** 
31
-	 * 属性列表。调用taobao.itemprops.get获取,属性必须是颜色属性,格式:pid:vid。
32
-	 **/
33
-	private $properties;
34
-	
35
-	private $apiParas = array();
36
-	
37
-	public function setId($id)
38
-	{
39
-		$this->id = $id;
40
-		$this->apiParas["id"] = $id;
41
-	}
42
-
43
-	public function getId()
44
-	{
45
-		return $this->id;
46
-	}
47
-
48
-	public function setNumIid($numIid)
49
-	{
50
-		$this->numIid = $numIid;
51
-		$this->apiParas["num_iid"] = $numIid;
52
-	}
53
-
54
-	public function getNumIid()
55
-	{
56
-		return $this->numIid;
57
-	}
58
-
59
-	public function setPicPath($picPath)
60
-	{
61
-		$this->picPath = $picPath;
62
-		$this->apiParas["pic_path"] = $picPath;
63
-	}
64
-
65
-	public function getPicPath()
66
-	{
67
-		return $this->picPath;
68
-	}
69
-
70
-	public function setPosition($position)
71
-	{
72
-		$this->position = $position;
73
-		$this->apiParas["position"] = $position;
74
-	}
75
-
76
-	public function getPosition()
77
-	{
78
-		return $this->position;
79
-	}
80
-
81
-	public function setProperties($properties)
82
-	{
83
-		$this->properties = $properties;
84
-		$this->apiParas["properties"] = $properties;
85
-	}
86
-
87
-	public function getProperties()
88
-	{
89
-		return $this->properties;
90
-	}
91
-
92
-	public function getApiMethodName()
93
-	{
94
-		return "taobao.item.joint.propimg";
95
-	}
96
-	
97
-	public function getApiParas()
98
-	{
99
-		return $this->apiParas;
100
-	}
101
-	
102
-	public function check()
103
-	{
104
-		
105
-		RequestCheckUtil::checkNotNull($this->numIid,"numIid");
106
-		RequestCheckUtil::checkMinValue($this->numIid,0,"numIid");
107
-		RequestCheckUtil::checkNotNull($this->picPath,"picPath");
108
-		RequestCheckUtil::checkNotNull($this->properties,"properties");
109
-	}
110
-	
111
-	public function putOtherTextParam($key, $value) {
112
-		$this->apiParas[$key] = $value;
113
-		$this->$key = $value;
114
-	}
115
-}

+ 0 - 66
extend/taobaosdk/top/request/ItemSkusGetRequest.php

@@ -1,66 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.item.skus.get request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2020.07.21
7
- */
8
-class ItemSkusGetRequest
9
-{
10
-	/** 
11
-	 * 需返回的字段列表。可选值:Sku结构体中的所有字段;字段之间用“,”分隔。
12
-	 **/
13
-	private $fields;
14
-	
15
-	/** 
16
-	 * sku所属商品数字id,必选。num_iid个数不能超过40个
17
-	 **/
18
-	private $numIids;
19
-	
20
-	private $apiParas = array();
21
-	
22
-	public function setFields($fields)
23
-	{
24
-		$this->fields = $fields;
25
-		$this->apiParas["fields"] = $fields;
26
-	}
27
-
28
-	public function getFields()
29
-	{
30
-		return $this->fields;
31
-	}
32
-
33
-	public function setNumIids($numIids)
34
-	{
35
-		$this->numIids = $numIids;
36
-		$this->apiParas["num_iids"] = $numIids;
37
-	}
38
-
39
-	public function getNumIids()
40
-	{
41
-		return $this->numIids;
42
-	}
43
-
44
-	public function getApiMethodName()
45
-	{
46
-		return "taobao.item.skus.get";
47
-	}
48
-	
49
-	public function getApiParas()
50
-	{
51
-		return $this->apiParas;
52
-	}
53
-	
54
-	public function check()
55
-	{
56
-		
57
-		RequestCheckUtil::checkNotNull($this->fields,"fields");
58
-		RequestCheckUtil::checkMaxListSize($this->fields,20,"fields");
59
-		RequestCheckUtil::checkNotNull($this->numIids,"numIids");
60
-	}
61
-	
62
-	public function putOtherTextParam($key, $value) {
63
-		$this->apiParas[$key] = $value;
64
-		$this->$key = $value;
65
-	}
66
-}

+ 0 - 49
extend/taobaosdk/top/request/ItemUpdateDelistingRequest.php

@@ -1,49 +0,0 @@
1
-<?php
2
-/**
3
- * TOP API: taobao.item.update.delisting request
4
- * 
5
- * @author auto create
6
- * @since 1.0, 2019.10.31
7
- */
8
-class ItemUpdateDelistingRequest
9
-{
10
-	/** 
11
-	 * 商品数字ID,该参数必须
12
-	 **/
13
-	private $numIid;
14
-	
15
-	private $apiParas = array();
16
-	
17
-	public function setNumIid($numIid)
18
-	{
19
-		$this->numIid = $numIid;
20
-		$this->apiParas["num_iid"] = $numIid;
21
-	}
22
-
23
-	public function getNumIid()
24
-	{
25
-		return $this->numIid;
26
-	}
27
-
28
-	public function getApiMethodName()
29
-	{
30
-		return "taobao.item.update.delisting";
31
-	}
32
-	
33
-	public function getApiParas()
34
-	{
35
-		return $this->apiParas;
36
-	}
37
-	
38
-	public function check()
39
-	{
40
-		
41
-		RequestCheckUtil::checkNotNull($this->numIid,"numIid");
42
-		RequestCheckUtil::checkMinValue($this->numIid,0,"numIid");
43
-	}
44
-	
45
-	public function putOtherTextParam($key, $value) {
46
-		$this->apiParas[$key] = $value;
47
-		$this->$key = $value;
48
-	}
49
-}

+ 0 - 0
extend/taobaosdk/top/request/ItemUpdateListingRequest.php


部分文件因为文件数量过多而无法显示