ReturnsData.php
3.75 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?php
namespace Libmodels\Web\Home;
use Api\Yohobuy;
use Api\Sign;
//退换货类
class ReturnsData
{
//退换货订单列表
public static function getReturnsData($uid, $limit = 10, $page = 1)
{
$param = array();
$param = Yohobuy::param();
$param['method'] = 'app.refund.getList';
$param['uid'] = $uid;
$param['limit'] = $limit;
$param['page'] = $page;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(yohobuy::API_URL, $param);
}
//可退货商品列表
public static function getRefundGoodsList($orderCode, $uid)
{
$param = array();
$param = Yohobuy::param();
$param['method'] = 'app.refund.goodsList';
$param['order_code'] = $orderCode;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(yohobuy::API_URL, $param);
}
//可换货商品列表
public static function getChangeGoodsList($orderCode, $uid)
{
$param = array();
$param = Yohobuy::param();
$param['method'] = 'app.change.goodsList';
$param['order_code'] = $orderCode;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(yohobuy::API_URL, $param);
}
//换货详情
public static function getChangeDetail($uid, $id)
{
$param = array();
$param = Yohobuy::param();
$param['method'] = 'app.change.detail';
$param['uid'] = $uid;
$param['id'] = $id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(yohobuy::API_URL, $param);
}
//退货详情
public static function getRefundDetail($uid, $id)
{
$param = array();
$param = Yohobuy::param();
$param['method'] = 'app.refund.detail';
$param['uid'] = $uid;
$param['id'] = $id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(yohobuy::API_URL, $param);
}
//快递公司列表
public static function getExpressCompany()
{
$param = array();
$param = Yohobuy::param();
$param['method'] = 'app.express.getExpressCompany';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(yohobuy::API_URL, $param);
}
//设置快递
public static function setExpressNumber($id, $expressId, $expressNumber,$uid, $expressCompany, $isChange)
{
$param = array();
$param = Yohobuy::param();
$param['method'] = $isChange ? 'app.change.setexpress' : 'app.refund.setexpress';
$param['id'] = $id;
$param['express_id'] = $expressId;
$param['express_number'] = $expressNumber;
$param['uid'] = $uid;
$param['express_company'] = $expressCompany;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(yohobuy::API_URL, $param);
}
//可退货商品列表数据
public static function getRefundGoodsData($orderCode, $uid)
{
$param = array();
$param = Yohobuy::param();
$param['method'] = 'app.refund.goodsList';
$param['order_code'] = $orderCode;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(yohobuy::API_URL, $param);
}
//可换货商品列表数据
public static function getChangeGoodsData($orderCode, $uid)
{
$param = array();
$param = Yohobuy::param();
$param['method'] = 'app.change.goodsList';
$param['order_code'] = $orderCode;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(yohobuy::API_URL, $param);
}
}