This repository has been archived by the owner on Sep 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #293 from bangbangda/add-shop-doc
增加自定义版交易组件开放接口文档1.2
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# 自定义版交易组件及开放接口 - 订单接口 | ||
|
||
|
||
## 生成订单 | ||
|
||
API: | ||
|
||
``` | ||
$order = [ | ||
'create_time' => '2020-03-25 13:05:25' | ||
'type' => 0, | ||
...... | ||
]; | ||
$app->shop_order->add($productId); | ||
``` | ||
|
||
> 注意:该接口可重入,如果order_id或out_order_id已存在,会直接更新整个订单数据 | ||
|
||
## 同步订单支付结果 | ||
|
||
API: | ||
|
||
``` | ||
$pay = [ | ||
'out_order_id' => 'abc123' | ||
'action_type' => 1, | ||
...... | ||
]; | ||
$app->shop_order->add($productId); | ||
``` | ||
|
||
|
||
## 获取订单 | ||
|
||
API: | ||
|
||
``` | ||
// 商家自定义订单ID 微信侧订单id (二选一) | ||
$orderId = [ | ||
'out_order_id' => 'abc123' | ||
'order_id' => 122221, | ||
]; | ||
$openid = 'abcdefg12112'; | ||
$app->shop_order->get($openid, $orderId); | ||
``` | ||
|
||
|
||
## 检查场景值是否在支付校验范围内 | ||
|
||
API: | ||
|
||
``` | ||
$app->shop_order->sceneCheck(1175); | ||
``` |