提交 1df2d45c authored 作者: zhanglibo's avatar zhanglibo

淘特支付

上级 730b3de3
...@@ -377,3 +377,25 @@ func (s orderItao) Reflect(ctx context.Context, req string) (res *OrderReflectRe ...@@ -377,3 +377,25 @@ func (s orderItao) Reflect(ctx context.Context, req string) (res *OrderReflectRe
}).Scan(&res) }).Scan(&res)
return return
} }
type OrderPayRes struct {
Result struct {
ErrCode string `json:"errCode"`
ErrMsg string `json:"errMsg"`
Success bool `json:"success"`
} `json:"result"`
}
func (s orderItao) Pay(ctx context.Context, req string) (res *OrderPayRes, err error) {
method := "com.alibaba.c2m/ltao.pay.agreementPay"
result, err := server.Post(ctx, method, g.Map{
"request": g.Map{
"bizOrderId": req,
},
})
_ = gjson.NewWithOptions(result, gjson.Options{
StrNumber: true,
}).Scan(&res)
return
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论