Skip to content

Commit aedf10e

Browse files
committed
README增加使用示例
1 parent 170d11f commit aedf10e

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,46 @@
3636

3737
* 查询商户资料
3838

39-
## 待补充
39+
## 使用示例
40+
41+
```lua
42+
local cashier = require "cloud.payjs.cashier"
43+
local native = require "cloud.payjs.native"
44+
local micro = require "cloud.payjs.micro"
45+
local face = require "cloud.payjs.face"
46+
local js = require "cloud.payjs.js"
47+
local order = require "cloud.payjs.order"
48+
local utils = require "cloud.payjs.utils"
49+
50+
local mchid = "123456"
51+
local key = "wodjwaiodwadka"
52+
53+
-- 支付相关接口
54+
-- js.pay(mchid, key, ...)
55+
-- native.pay(mchid, key, ...)
56+
-- cashier.pay(mchid, key, ...)
57+
-- face.pay(mchid, key, ...)
58+
59+
-- 订单相关接口
60+
-- order.order_check(mchid, key, order_id)
61+
-- order.order_close(mchid, key, order_id)
62+
-- order.order_reverse(mchid, key, order_id)
63+
-- order.order_refund(mchid, key, order_id)
64+
65+
66+
-- 查询商户信息
67+
-- utils.mch_info(mchid, key)
68+
69+
-- 查询银行编码
70+
-- utils.bank_code(mchid, key, bank)
71+
72+
-- 获取用户 OPENID
73+
-- utils.mch_openid(mchid, key, callback_url)
74+
```
75+
76+
77+
## 协议
78+
79+
[MIT](https://github.com/CandyMi/payjs-lua/blob/master/LICENSE)
80+
81+

0 commit comments

Comments
 (0)