Skip to content

Commit

Permalink
Shipping documentation (#2775)
Browse files Browse the repository at this point in the history
* Create shipping.md

* Update sidebar.js
  • Loading branch information
fireqong authored Dec 18, 2023
1 parent 557409d commit 403d3b9
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 1 deletion.
117 changes: 117 additions & 0 deletions docs/src/5.x/mini-program/shipping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# 小程序发货信息管理

> 微信文档 https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/order-shipping/order-shipping.html

## 发货信息录入接口

```php
$data = [
'order_key' => [
'order_number_type' => 1,
'mchid' => '',
'out_trade_no' => ''
],
'logistics_type' => 4,
'delivery_mode' => 1,
'shipping_list' => [
'tracking_no' => '323244567777',
'express_company' => 'DHL',
'item_desc' => '微信红包抱枕*1个',
'contact' => [
'consignor_contact' => '189****1234',
'receiver_contact' => '189****1234'
],
],
'upload_time' => '2022-12-15T13:29:35.120+08:00',
'payer' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o'
]
];

$app->shipping->uploadShippingInfo($data);
```

## 发货信息合单录入接口

```php
$data = [
'order_key' => [
'order_number_type' => 1,
'mchid' => '',
'out_trade_no' => ''
],
'sub_orders' => [
'order_key' => [
'order_number_type' => 1,
'transaction_id' => '',
'mchid' => '',
'out_trade_no' => ''
],
'logistics_type' => 4,
'delivery_mode' => 1,
'shipping_list' => [
'tracking_no' => '323244567777',
'express_company' => 'DHL',
'item_desc' => '微信红包抱枕*1个',
'contact' => [
'consignor_contact' => '189****1234',
'receiver_contact' => '189****1234'
],
],
],
'upload_time' => '2022-12-15T13:29:35.120+08:00',
'payer' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o'
]
];

$app->shipping->uploadCombineShippingInfo($data);
```

## 查询订单发货状态

```php
$data = $app->shipping->getOrder([
'transaction_id' => 'xxx'
]);
```

## 查询订单列表

```php
$data = $app->shipping->getOrderList();
```

## 确认收货提醒接口

```php
$data = [
'transaction_id' => '42000020212023112332159214xx',
'received_time' => ''
];

$app->shipping->notifyConfirmReceive($data);
```

## 消息跳转路径设置接口

```php
$data = [
'path' => 'pages/goods/order_detail?id=xxxx',
];

$app->shipping->setMsgJumpPath($data);
```

## 查询小程序是否已开通发货信息管理服务

```php
$app->shipping->isTradeManaged();
```

## 查询小程序是否已完成交易结算管理确认

```php
$app->shipping->isTradeCompleted();
```
6 changes: 5 additions & 1 deletion docs/src/5.x/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ exports = module.exports = [
text: 'Short Link',
link: '/5.x/mini-program/short_link.html'
},
{ text: '手机号', link: '/5.x/mini-program/phone_number.html' }
{ text: '手机号', link: '/5.x/mini-program/phone_number.html' },
{
text: '小程序发货信息管理服务',
link: '/5.x/mini-program/shipping.html'
}
]
},
{
Expand Down

1 comment on commit 403d3b9

@vercel
Copy link

@vercel vercel bot commented on 403d3b9 Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

easywechat – ./

easywechat-git-6x-overtrue.vercel.app
easywechat.vercel.app
easywechat-overtrue.vercel.app

Please sign in to comment.