Merge branch 'menu' of https://github.com/black1552/lkl_sdk into menu
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
package transpreorder
|
||||
|
||||
import (
|
||||
"github.com/black1552/lkl_sdk/consts"
|
||||
"github.com/black1552/lkl_sdk/lklsdk/common"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
type TransPreorder struct {
|
||||
client *common.Client[TransPreorderResponse]
|
||||
}
|
||||
|
||||
func NewTransPreorderApi(client *common.Client[TransPreorderResponse]) *TransPreorder {
|
||||
return &TransPreorder{client: client}
|
||||
}
|
||||
|
||||
func (tp *TransPreorder) TransPreorder(reqData *TransPreorderRequestData) (*TransPreorderResponse, error) {
|
||||
// 构建请求结构体
|
||||
request := &TransPreorderRequest{
|
||||
ReqTime: gtime.Now().Format("YmdHis"),
|
||||
Version: "3.0",
|
||||
ReqData: reqData,
|
||||
}
|
||||
return tp.client.DoRequest(consts.BASE_URL+consts.LKL_DCP_TRANS_PREORDER_URL, request)
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package transpreorder
|
||||
|
||||
type TransPreorderRequest struct {
|
||||
ReqTime string `json:"req_time"`
|
||||
Version string `json:"version"`
|
||||
ReqData *TransPreorderRequestData `json:"req_data"`
|
||||
}
|
||||
|
||||
type TransPreorderRequestData struct {
|
||||
OutTradeNo string `json:"out_trade_no"`
|
||||
TotalAmount string `json:"total_amount"`
|
||||
Subject string `json:"subject"`
|
||||
Body string `json:"body"`
|
||||
NotifyUrl string `json:"notify_url"`
|
||||
ExpireTime string `json:"expire_time"`
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package transpreorder
|
||||
|
||||
type TransPreorderResponse struct {
|
||||
}
|
||||
Reference in New Issue
Block a user