Documentation ¶
Overview ¶
* @Author: i@douxuefeng.cn * @Date: 2022-05-14 17:02:20 * @LastEditTime: 2022-08-19 16:49:27 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\pay\app.go
* @Author: i@douxuefeng.cn * @Date: 2022-08-31 11:28:38 * @LastEditTime: 2022-08-31 15:46:19 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: /go-utils/wechat/pay/app_partner.go
* @Author: i@douxuefeng.cn * @Date: 2022-06-01 09:30:51 * @LastEditTime: 2022-08-31 11:55:56 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: /go-utils/wechat/pay/config.go
* @Author: i@douxuefeng.cn * @Date: 2022-05-14 17:02:20 * @LastEditTime: 2022-07-26 09:43:56 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\pay\h5.go
* @Author: i@douxuefeng.cn * @Date: 2022-05-14 17:00:20 * @LastEditTime: 2022-07-26 09:44:09 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\pay\jsapi.go
* @Author: i@douxuefeng.cn * @Date: 2022-08-31 11:28:38 * @LastEditTime: 2022-08-31 15:47:08 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: /go-utils/wechat/pay/jsapi_partner.go
* @Author: i@douxuefeng.cn * @Date: 2022-05-14 17:04:58 * @LastEditTime: 2022-07-26 09:44:25 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\pay\native.go
* @Author: i@douxuefeng.cn * @Date: 2022-05-14 17:05:56 * @LastEditTime: 2022-06-01 10:10:56 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\pay\notify.go
* @Author: i@douxuefeng.cn * @Date: 2022-06-01 09:51:22 * @LastEditTime: 2022-08-31 13:28:38 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: /go-utils/wechat/pay/pay.go
* @Author: i@douxuefeng.cn * @Date: 2022-05-14 17:06:39 * @LastEditTime: 2022-07-26 09:44:52 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\pay\refund.go
* @Author: i@douxuefeng.cn * @Date: 2022-05-14 17:00:53 * @LastEditTime: 2022-06-01 09:58:48 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\pay\tools.go
* @Author: i@douxuefeng.cn * @Date: 2022-09-14 12:34:12 * @LastEditTime: 2022-09-14 13:06:36 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: /go-utils/wechat/pay/transfer_batch.go
Index ¶
- func GetClient(cfg *PayConfig) (*core.Client, context.Context, error)
- func NewApp(cfg *PayConfig) *app
- func NewAppPartner(cfg *PayConfig) *appPartner
- func NewH5(cfg *PayConfig) *h5
- func NewJsApi(cfg *PayConfig) *jsApi
- func NewJsApiPartner(cfg *PayConfig) *jsApiPartner
- func NewMiniApi(cfg *PayConfig) *miniApi
- func NewNative(cfg *PayConfig) *native
- func NewNotify(cfg *PayConfig) *notify
- func NewRefund(cfg *PayConfig) *refund
- func NewTransferBatch(cfg *PayConfig) *transferBatch
- type BatchData
- type OrderRequest
- type Pay
- type PayConfig
- type RefundRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAppPartner ¶ added in v0.2.3
func NewAppPartner(cfg *PayConfig) *appPartner
func NewJsApiPartner ¶ added in v0.2.3
func NewJsApiPartner(cfg *PayConfig) *jsApiPartner
func NewMiniApi ¶
func NewMiniApi(cfg *PayConfig) *miniApi
func NewTransferBatch ¶ added in v0.2.3
func NewTransferBatch(cfg *PayConfig) *transferBatch
Types ¶
type BatchData ¶ added in v0.2.3
type BatchData struct { BatchName string `json:"batch_name"` BatchRemark string `json:"batch_remark"` OutBatchNo string `json:"out_batch_no"` TotalAmount float64 `json:"total_amount"` TotalNum int64 `json:"total_num"` TransferDetailList []transferbatch.TransferDetailInput }
type OrderRequest ¶
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 Pay ¶
type Pay interface { PrepayOrder(OrderRequest) QueryOrderByTransactionId(string) QueryOrderByOutTradeNo(string) }
type PayConfig ¶
type PayConfig struct { // 普通支付 Appid string `json:"appid"` MiniAppid string `json:"mini_appid"` AppAppid string `json:"app_appid"` // 服务商模式 SpAppid string `json:"sp_appid"` SpMchid string `json:"sp_mchid"` SubAppid string `json:"sub_appid"` SubMchid string `json:"sub_mchid"` MchId string `json:"mch_id"` MchCertificateSerialNumber string `json:"mch_certificate_serial_number "` //商户证书序列号 MchApiV3Key string `json:"mch_api_v3_key"` //商户APIv3密钥 Notify string `json:"notify"` ApiclientKey string `json:"apiclient_key"` }
type RefundRequest ¶
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"` }