Documentation ¶
Overview ¶
Package order 微信小店/订单管理
Index ¶
- func Close(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
- func GetByFilter(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
- func GetById(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
- func SetDelivery(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
关闭订单
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
POST https://api.weixin.qq.com/merchant/order/close?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/order" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := order.Close(ctx, payload) fmt.Println(resp, err) }
Output:
func GetByFilter ¶
func GetByFilter(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
根据订单状态/创建时间获取订单详情
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
POST https://api.weixin.qq.com/merchant/order/getbyfilter?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/order" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := order.GetByFilter(ctx, payload) fmt.Println(resp, err) }
Output:
func GetById ¶
func GetById(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
根据订单ID获取订单详情
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
POST https://api.weixin.qq.com/merchant/order/getbyid?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/order" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := order.GetById(ctx, payload) fmt.Println(resp, err) }
Output:
func SetDelivery ¶
func SetDelivery(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
设置订单发货信息
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
POST https://api.weixin.qq.com/merchant/order/setdelivery?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/order" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := order.SetDelivery(ctx, payload) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.