Documentation ¶
Overview ¶
* @Author: i@douxuefeng.cn * @Date: 2022-05-14 17:02:20 * @LastEditTime: 2022-06-01 10:53:19 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\pay\app.go
* @Author: i@douxuefeng.cn * @Date: 2022-06-01 09:30:51 * @LastEditTime: 2022-06-01 09:58:19 * @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-06-01 10:54:14 * @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-06-01 10:55:23 * @LastEditors: i@douxuefeng.cn * @Description: * @FilePath: \go-utils\wechat\pay\jsapi.go
* @Author: i@douxuefeng.cn * @Date: 2022-05-14 17:04:58 * @LastEditTime: 2022-06-01 10:56:47 * @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-06-01 13:25:13 * @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-06-01 13:24:44 * @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
Index ¶
- func GetClient(cfg *PayConfig) (*core.Client, context.Context, error)
- func NewApp(cfg *PayConfig) *app
- func NewH5(cfg *PayConfig) *h5
- func NewJsApi(cfg *PayConfig) *jsApi
- func NewMiniApi(cfg *PayConfig) *miniApi
- func NewNative(cfg *PayConfig) *native
- func NewNotify(cfg *PayConfig) *notify
- func NewRefund(cfg *PayConfig) *refund
- type OrderRequest
- type Pay
- type PayConfig
- type RefundRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMiniApi ¶
func NewMiniApi(cfg *PayConfig) *miniApi
Types ¶
type OrderRequest ¶
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"` 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"` }