LogisticsDummySendRequest.php
2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/**
* TOP API: taobao.logistics.dummy.send request
*
* @author auto create
* @since 1.0, 2012-12-13 16:33:03
*/
class LogisticsDummySendRequest
{
/**
* feature参数格式<br>
范例: identCode=tid1:识别码1,识别码2|tid2:识别码3;machineCode=tid3:3C机器号A,3C机器号B<br>
identCode为识别码的KEY,machineCode为3C的KEY,多个key之间用”;”分隔<br>
“tid1:识别码1,识别码2|tid2:识别码3”为identCode对应的value。
"|"不同商品间的分隔符。<br>
例1商品和2商品,之间就用"|"分开。<br>
TID就是商品代表的子订单号,对应taobao.trade.fullinfo.get 接口获得的oid字段。(通过OID可以唯一定位到当前商品上)<br>
":"TID和具体传入参数间的分隔符。冒号前表示TID,之后代表该商品的参数属性。<br>
"," 属性间分隔符。(对应商品数量,当存在一个商品的数量超过1个时,用逗号分开)。<br>
具体:当订单中A商品的数量为2个,其中手机串号分别为"12345","67890"。<br>
参数格式:identCode=TIDA:12345,67890。
TIDA对应了A宝贝,冒号后用逗号分隔的"12345","67890".说明本订单A宝贝的数量为2,值分别为"12345","67890"。<br>
当存在"|"时,就说明订单中存在多个商品,商品间用"|"分隔了开来。|"之后的内容含义同上。
**/
private $feature;
/**
* 淘宝交易ID
**/
private $tid;
private $apiParas = array();
public function setFeature($feature)
{
$this->feature = $feature;
$this->apiParas["feature"] = $feature;
}
public function getFeature()
{
return $this->feature;
}
public function setTid($tid)
{
$this->tid = $tid;
$this->apiParas["tid"] = $tid;
}
public function getTid()
{
return $this->tid;
}
public function getApiMethodName()
{
return "taobao.logistics.dummy.send";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkNotNull($this->tid,"tid");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}