-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
Client.php
140 lines (126 loc) · 4.2 KB
/
Client.php
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
135
136
137
138
139
140
<?php
namespace EasyWeChat\MiniProgram\Shipping;
use EasyWeChat\Kernel\BaseClient;
class Client extends BaseClient
{
/**
* 发货信息录入接口
*
* @param array $params
*
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function uploadShippingInfo(array $params)
{
return $this->httpPostJson('wxa/sec/order/upload_shipping_info', $params);
}
/**
* 发货信息合单录入接口
*
* @param array $params
*
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function uploadCombineShippingInfo(array $params)
{
return $this->httpPostJson('wxa/sec/order/upload_combined_shipping_info', $params);
}
/**
* 查询订单发货状态
*
* @param array $params
*
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function getOrder(array $params)
{
return $this->httpPostJson('wxa/sec/order/get_order', $params);
}
/**
* 查询订单列表
*
* @param array $params
*
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function getOrderList(array $params = [])
{
return $this->httpPostJson('wxa/sec/order/get_order_list', $params);
}
/**
* 确认收货提醒接口
*
* @param array $params
*
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function notifyConfirmReceive(array $params)
{
return $this->httpPostJson('wxa/sec/order/notify_confirm_receive', $params);
}
/**
* 消息跳转路径设置接口
*
* @param string $path
*
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function setMsgJumpPath(string $path)
{
$params = [
'path' => $path
];
return $this->httpPostJson('wxa/sec/order/set_msg_jump_path', $params);
}
/**
* 查询小程查询小程序是否已开通发货信息管理服务
*
* @param string $appID
*
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function isTradeManaged(string $appID = '')
{
$params = [
'appid' => empty($appID) ? $this->app['config']['app_id'] : $appID
];
return $this->httpPostJson('wxa/sec/order/is_trade_managed', $params);
}
/**
* 查询小程序是否已完成交易结算管理确认
*
* @param string $appID
*
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function isTradeCompleted(string $appID = '')
{
$params = [
'appid' => empty($appID) ? $this->app['config']['app_id'] : $appID
];
return $this->httpPostJson('wxa/sec/order/is_trade_management_confirmation_completed', $params);
}
}