-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 小程序发货信息管理服务 * 小程序发货信息管理服务 * 小程序发货信息管理服务
- Loading branch information
Showing
11 changed files
with
394 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace EasyWeChat\MiniProgram\Shipping; | ||
|
||
use Pimple\Container; | ||
use Pimple\ServiceProviderInterface; | ||
|
||
class ServiceProvider implements ServiceProviderInterface | ||
{ | ||
public function register(Container $app) | ||
{ | ||
$app['shipping'] = function ($app) { | ||
return new Client($app); | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,21 +15,20 @@ | |
|
||
/** | ||
* Class Client | ||
* | ||
* | ||
* @author lio990527 <[email protected]> | ||
*/ | ||
class Client extends BaseClient | ||
{ | ||
|
||
/** | ||
* 获取盘专业版信息 | ||
* | ||
* | ||
* @param string $userid | ||
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string | ||
* | ||
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException | ||
* @throws \GuzzleHttp\Exception\GuzzleException | ||
* | ||
* | ||
* @see https://developer.work.weixin.qq.com/document/path/95856#%E8%8E%B7%E5%8F%96%E7%9B%98%E4%B8%93%E4%B8%9A%E7%89%88%E4%BF%A1%E6%81%AF | ||
*/ | ||
public function proInfo($userid) | ||
|
@@ -44,7 +43,7 @@ public function proInfo($userid) | |
* | ||
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException | ||
* @throws \GuzzleHttp\Exception\GuzzleException | ||
* | ||
* | ||
* @see https://developer.work.weixin.qq.com/document/path/95856#%E8%8E%B7%E5%8F%96%E7%9B%98%E5%AE%B9%E9%87%8F%E4%BF%A1%E6%81%AF | ||
*/ | ||
public function capacity() | ||
|
Oops, something went wrong.