1 Star 0 Fork 1

可乐烛光烟 / go-utils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pay.go 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
可乐烛光烟 提交于 2022-11-09 00:21 . Initial commit
/*
* @Author: i@rysa.cn
* @Date: 2022-06-01 09:51:22
* @LastEditTime: 2022-08-31 13:28:38
* @LastEditors: i@rysa.cn
* @Description:
* @FilePath: /go-utils/wechat/pay/pay.go
*/
package pay
type Pay interface {
PrepayOrder(OrderRequest)
QueryOrderByTransactionId(string)
QueryOrderByOutTradeNo(string)
}
type OrderRequest struct {
Description string `json:"description"`
OutTradeNo string `json:"out_trade_no"`
Attach string `json:"attach"`
Amount float64 `json:"amount"` //单位元
Openid string `json:"openid"`
SubOpenid string `json:"sub_openid"` //子商户openid
ClientIp string `json:"client_ip"`
H5Info string `json:"h5_info"` // iOS, Android, Wap H5支付
}
type RefundRequest struct {
SubMchid string `json:"sub_mchid"`
TransactionId string `json:"transaction_id"` //outradeno 填一个就可以
OutTradeNo string `json:"out_trade_no"`
OutRefundNo string `json:"out_refund_no"`
Reason string `json:"reason"`
NotifyUrl string `json:"notify_url"`
Amount float64 `json:"amount"`
}
1
https://gitee.com/rysa/go-utils.git
git@gitee.com:rysa/go-utils.git
rysa
go-utils
go-utils
v1.1.0

搜索帮助