wechatpay

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderQueryRequest

type OrderQueryRequest struct {
	XMLName       xml.Name `form:"-" json:"-" xml:"xml"`
	AppId         string   `form:"appid" json:"appid" xml:"appid"`                            //必填 微信开放平台审核通过的应用APPID
	MchId         string   `form:"mch_id" json:"mch_id" xml:"mch_id"`                         //必填 微信支付分配的商户号
	OutTradeNo    string   `form:"out_trade_no" json:"out_trade_no" xml:"out_trade_no"`       //必填--二选一 商户系统内部的订单号,当没提供transaction_id时需要传这个
	TransactionId string   `form:"transaction_id" json:"transaction_id" xml:"transaction_id"` //必填--二选一 微信的订单号,优先使用
	NonceStr      string   `form:"nonce_str" json:"nonce_str" xml:"nonce_str"`                //必填 随机字符串,不长于32位
	Sign          string   `form:"sign" json:"sign" xml:"sign"`                               //必填 签名
}

================================================================================ * OrderQueryRequest数据域结构 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================

func (*OrderQueryRequest) ToMap

func (s *OrderQueryRequest) ToMap() map[string]string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 对象转成字典 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*OrderQueryRequest) ToXml

func (s *OrderQueryRequest) ToXml() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 对象转成Xml * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type OrderQueryResponse

type OrderQueryResponse struct {
	XMLName        xml.Name `form:"-" json:"-" xml:"xml"`
	ReturnCode     string   `form:"return_code" json:"return_code" xml:"return_code"`                //必填 返回状态码 SUCCESS
	ReturnMsg      string   `form:"return_msg" json:"return_msg" xml:"return_msg"`                   //必填 返回信息
	AppId          string   `form:"appid" json:"appid" xml:"appid"`                                  //必填 应用APPID
	MchId          string   `form:"mch_id" json:"mch_id" xml:"mch_id"`                               //必填 商户号
	OutTradeNo     string   `form:"out_trade_no" json:"out_trade_no" xml:"out_trade_no"`             //必填 商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一
	TransactionId  string   `form:"transaction_id" json:"transaction_id" xml:"transaction_id"`       //必填 微信支付订单号
	DeviceInfo     string   `form:"device_info" json:"device_info" xml:"device_info"`                //设备号
	NonceStr       string   `form:"nonce_str" json:"nonce_str" xml:"nonce_str"`                      //必填 随机字符串
	Attach         string   `form:"attach" json:"attach" xml:"attach"`                               //商家数据包,原样返回
	OpenId         string   `form:"open_id" json:"open_id" xml:"open_id"`                            //必填 用户在商户appid下的唯一标识
	CashFee        int      `form:"cash_fee" json:"cash_fee" xml:"cash_fee"`                         //必填 现金支付金额订单现金支付金额
	TotalFee       int      `form:"total_fee" json:"total_fee" xml:"total_fee"`                      //必填 订单总金额,单位为分
	CouponCount    int      `form:"coupon_count" json:"coupon_count" xml:"coupon_count"`             //代金券或立减优惠使用数量
	CouponFee      int      `form:"coupon_fee" json:"coupon_fee" xml:"coupon_fee"`                   //代金券或立减优惠金额<=订单总金额,订单总金额-代金券或立减优惠金额=现金支付金额
	IsSubscribe    string   `form:"is_subscribe" json:"is_subscribe" xml:"is_subscribe"`             //用户是否关注公众账号,Y-关注,N-未关注,仅在公众账号类型支付有效
	TradeState     string   `form:"trade_state" json:"trade_state" xml:"trade_state"`                //必填 SUCCESS—支付成功 REFUND—转入退款 NOTPAY—未支付 CLOSED—已关闭 REVOKED—已撤销(刷卡支付)USERPAYING--用户支付中 PAYERROR--支付失败(其他原因,如银行返回失败)
	TradeStateDesc string   `form:"trade_state_desc" json:"trade_state_desc" xml:"trade_state_desc"` //必填 对当前查询订单状态的描述和下一步操作的指引
	TradeType      string   `form:"trade_type" json:"trade_type" xml:"trade_type"`                   //必填 调用接口提交的交易类型
	BankType       string   `form:"bank_type" json:"bank_type" xml:"bank_type"`                      //必填 银行类型,采用字符串类型的银行标识
	CashFeeType    string   `form:"cash_fee_type" json:"cash_fee_type" xml:"cash_fee_type"`          //现金支付货币类型
	FeeType        string   `form:"fee_type" json:"fee_type" xml:"fee_type"`                         //符合ISO 4217标准的三位字母代码,默认人民币:CNY
	ResultCode     string   `form:"result_code" json:"result_code" xml:"result_code"`                //必填 业务结果
	ErrCode        string   `form:"err_code" json:"err_code" xml:"err_code"`                         //错误代码
	ErrCodeDes     string   `form:"err_code_des" json:"err_code_des" xml:"err_code_des"`             //错误代码描述
	TimeEnd        string   `form:"time_end" json:"time_end" xml:"time_end"`                         //必填 支付完成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010
	Sign           string   `form:"sign" json:"sign" xml:"sign"`                                     //必填 签名
}
================================================================================
  • OrderQueryResponse数据域结构
  • qq group: 582452342
  • email : 2091938785@qq.com
  • author : 美丽的地球啊 - mliu <xml> <return_code><![CDATA[SUCCESS]]></return_code> <return_msg><![CDATA[OK]]></return_msg> <appid><![CDATA[wx2421b1c4370ec43b]]></appid> <mch_id><![CDATA[10000100]]></mch_id> <device_info><![CDATA[1000]]></device_info> <nonce_str><![CDATA[TN55wO9Pba5yENl8]]></nonce_str> <sign><![CDATA[BDF0099C15FF7BC6B1585FBB110AB635]]></sign> <result_code><![CDATA[SUCCESS]]></result_code> <openid><![CDATA[oUpF8uN95-Ptaags6E_roPHg7AG0]]></openid> <is_subscribe><![CDATA[Y]]></is_subscribe> <trade_type><![CDATA[APP]]></trade_type> <bank_type><![CDATA[CCB_DEBIT]]></bank_type> <total_fee>1</total_fee> <fee_type><![CDATA[CNY]]></fee_type> <transaction_id><![CDATA[1008450740201411110005820873]]></transaction_id> <out_trade_no><![CDATA[1415757673]]></out_trade_no> <attach><![CDATA[订单额外描述]]></attach> <time_end><![CDATA[20141111170043]]></time_end> <trade_state><![CDATA[SUCCESS]]></trade_state> </xml>
  • ================================================================================

type PayResultMessage

type PayResultMessage struct {
	XMLName    xml.Name `xml:"xml"`
	ReturnCode string   `form:"return_code" json:"return_code" xml:"return_code"` //SUCCESS/FAIL SUCCESS表示商户接收通知成功并校验成功
	ReturnMsg  string   `form:"return_msg" json:"return_msg" xml:"return_msg"`    //返回信息,如非空,为错误原因:签名失败 参数格式校验错误
}
================================================================================
  • PayResultMessage数据域结构
  • qq group: 582452342
  • email : 2091938785@qq.com
  • author : 美丽的地球啊 - mliu <xml> <return_code><![CDATA[SUCCESS]]></return_code> <return_msg><![CDATA[OK]]></return_msg> </xml>
  • ================================================================================

func (*PayResultMessage) ToMap

func (s *PayResultMessage) ToMap() map[string]string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 对象转成字典 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*PayResultMessage) ToXml

func (s *PayResultMessage) ToXml() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 对象转成Xml * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type PayResultNotify

type PayResultNotify struct {
	XMLName       xml.Name `form:"-" json:"-" xml:"xml"`
	ReturnCode    string   `form:"return_code" json:"return_code" xml:"return_code"`          //必填 返回状态码 SUCCESS
	ReturnMsg     string   `form:"return_msg" json:"return_msg" xml:"return_msg"`             //返回信息
	AppId         string   `form:"appid" json:"appid" xml:"appid"`                            //必填 应用APPID
	MchId         string   `form:"mch_id" json:"mch_id" xml:"mch_id"`                         //必填 商户号
	OutTradeNo    string   `form:"out_trade_no" json:"out_trade_no" xml:"out_trade_no"`       //必填 商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一
	TransactionId string   `form:"transaction_id" json:"transaction_id" xml:"transaction_id"` //必填 微信支付订单号
	OpenId        string   `form:"open_id" json:"open_id" xml:"open_id"`                      //必填 用户在商户appid下的唯一标识
	DeviceInfo    string   `form:"device_info" json:"device_info" xml:"device_info"`          //设备号
	NonceStr      string   `form:"nonce_str" json:"nonce_str" xml:"nonce_str"`                //必填 随机字符串
	Attach        string   `form:"attach" json:"attach" xml:"attach"`                         //商家数据包,原样返回
	CouponCount   int      `form:"coupon_count" json:"coupon_count" xml:"coupon_count"`       //代金券或立减优惠使用数量
	CouponFee     int      `form:"coupon_fee" json:"coupon_fee" xml:"coupon_fee"`             //代金券或立减优惠金额<=订单总金额,订单总金额-代金券或立减优惠金额=现金支付金额
	CashFee       int      `form:"cash_fee" json:"cash_fee" xml:"cash_fee"`                   //必填 现金支付金额订单现金支付金额
	TotalFee      int      `form:"total_fee" json:"total_fee" xml:"total_fee"`                //必填 订单总金额,单位为分
	IsSubscribe   string   `form:"is_subscribe" json:"is_subscribe" xml:"is_subscribe"`       //用户是否关注公众账号,Y-关注,N-未关注,仅在公众账号类型支付有效
	TradeType     string   `form:"trade_type" json:"trade_type" xml:"trade_type"`             //必填 交易类型
	BankType      string   `form:"bank_type" json:"bank_type" xml:"bank_type"`                //必填 银行类型,采用字符串类型的银行标识
	CashfeeType   string   `form:"cash_fee_type" json:"cash_fee_type" xml:"cash_fee_type"`    //货币类型,符合ISO4217标准的三位字母代码,默认人民币:CNY
	FeeType       string   `form:"fee_type" json:"fee_type" xml:"fee_type"`                   //货币类型,符合ISO4217标准的三位字母代码,默认人民币:CNY
	ResultCode    string   `form:"result_code" json:"result_code" xml:"result_code"`          //必填 业务结果
	ErrCode       string   `form:"err_code" json:"err_code" xml:"err_code"`                   //错误代码
	ErrCodeDes    string   `form:"err_code_des" json:"err_code_des" xml:"err_code_des"`       //错误代码描述
	TimeEnd       string   `form:"time_end" json:"time_end" xml:"time_end"`                   //必填 支付完成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010
	Sign          string   `form:"sign" json:"sign" xml:"sign"`                               //必填 签名
}
================================================================================
  • PayResultNotify数据域结构
  • qq group: 582452342
  • email : 2091938785@qq.com
  • author : 美丽的地球啊 - mliu <xml> <appid><![CDATA[wx2421b1c4370ec43b]]></appid> <attach><![CDATA[支付测试]]></attach> <bank_type><![CDATA[CFT]]></bank_type> <fee_type><![CDATA[CNY]]></fee_type> <is_subscribe><![CDATA[Y]]></is_subscribe> <mch_id><![CDATA[10000100]]></mch_id> <nonce_str><![CDATA[5d2b6c2a8db53831f7eda20af46e531c]]></nonce_str> <openid><![CDATA[oUpF8uMEb4qRXf22hE3X68TekukE]]></openid> <out_trade_no><![CDATA[1409811653]]></out_trade_no> <result_code><![CDATA[SUCCESS]]></result_code> <return_code><![CDATA[SUCCESS]]></return_code> <sign><![CDATA[B552ED6B279343CB493C5DD0D78AB241]]></sign> <sub_mch_id><![CDATA[10000100]]></sub_mch_id> <time_end><![CDATA[20140903131540]]></time_end> <total_fee>1</total_fee> <trade_type><![CDATA[JSAPI]]></trade_type> <transaction_id><![CDATA[1004400740201409030005092168]]></transaction_id> </xml>
  • ================================================================================

type UnifiedOrderDetail

type UnifiedOrderDetail struct {
	GoodsDetail []*UnifiedOrderDetailItem `form:"detail" json:"detail"`
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 统一下单商品详细项列表 * 使用Json格式,传输签名前请务必使用CDATA标签将JSON文本串保护起来 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type UnifiedOrderDetailItem

type UnifiedOrderDetailItem struct {
	GoodsId       string `form:"goods_id" json:"goods_id"`             //必填 商品的编号
	WxpayGoodsId  string `form:"wxpay_goods_id" json:"wxpay_goods_id"` //可选 微信支付定义的统一商品编号
	GoodsName     string `form:"goods_name" json:"goods_name"`         //必填 商品名称
	GoodsCategory string `form:"goods_category" json:"goods_category"` //可选 商品类目ID
	Quantity      int    `form:"quantity" json:"quantity"`             //必填 商品数量
	Price         int    `form:"price" json:"price"`                   //必填 商品单价,单位为分
	Body          string `form:"body" json:"body"`                     //可选 商品描述信息
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 统一下单商品详细项 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type UnifiedOrderRequest

type UnifiedOrderRequest struct {
	XMLName        xml.Name            `form:"-" json:"-" xml:"xml"`
	AppId          string              `form:"appid" json:"appid" xml:"appid"`                                  //必填 微信开放平台审核通过的应用APPID
	MchId          string              `form:"mch_id" json:"mch_id" xml:"mch_id"`                               //必填 微信支付分配的商户号
	DeviceInfo     string              `form:"device_info" json:"device_info" xml:"device_info"`                //终端设备号(门店号或收银设备ID),默认请传"WEB"
	NonceStr       string              `form:"nonce_str" json:"nonce_str" xml:"nonce_str"`                      //必填 随机字符串,不长于32位
	Body           string              `form:"body" json:"body" xml:"body"`                                     //必填 商品描述交易字段格式根据不同的应用场景按照以下格式:APP——需传入应用市场上的APP名字-实际商品名称,天天爱消除-游戏充值。
	Detail         *UnifiedOrderDetail `form:"detail" json:"detail" xml:"detail"`                               //商品详细列表,使用Json格式,传输签名前请务必使用CDATA标签将JSON文本串保护起来。
	Attach         string              `form:"attach" json:"attach" xml:"attach"`                               //附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据
	OutTradeNo     string              `form:"out_trade_no" json:"out_trade_no" xml:"out_trade_no"`             //必填 商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一
	FeeType        string              `form:"fee_type" json:"fee_type" xml:"fee_type"`                         //符合ISO 4217标准的三位字母代码,默认人民币:CNY
	TotalFee       int                 `form:"total_fee" json:"total_fee" xml:"total_fee"`                      //必填 订单总金额,单位为分
	SpbillCreateIp string              `form:"spbill_create_ip" json:"spbill_create_ip" xml:"spbill_create_ip"` //必填 用户端实际ip
	TimeStart      string              `form:"time_start" json:"time_start" xml:"time_start"`                   //订单生成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010
	TimeExpire     string              `form:"time_expire" json:"time_expire" xml:"time_expire"`                //订单失效时间,格式为yyyyMMddHHmmss,如2009年12月27日9点10分10秒表示为20091227091010,注意:最短失效时间间隔必须大于5分钟
	GoodsTag       string              `form:"goods_tag" json:"goods_tag" xml:"goods_tag"`                      //商品标记,代金券或立减优惠功能的参数
	NotifyUrl      string              `form:"notify_url" json:"notify_url" xml:"notify_url"`                   //必填 接收微信支付异步通知回调地址,通知url必须为直接可访问的url,不能携带参数
	TradeType      string              `form:"trade_type" json:"trade_type" xml:"trade_type"`                   //必填 支付类型(APP)
	LimitPay       string              `form:"limit_pay" json:"limit_pay" xml:"limit_pay"`                      //no_credit--指定不能使用信用卡支付
	Sign           string              `form:"sign" json:"sign" xml:"sign"`                                     //必填 签名
	SignType       string              `form:"sign_type" json:"sign_type" xml:"sign_type"`                      //签名类型,目前支持HMAC-SHA256和MD5,默认为MD5
}

================================================================================ * UnifiedOrderRequest数据域结构 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================

func (*UnifiedOrderRequest) ToMap

func (s *UnifiedOrderRequest) ToMap() map[string]string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 对象转成字典 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UnifiedOrderRequest) ToXml

func (s *UnifiedOrderRequest) ToXml() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 对象转成Xml * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type UnifiedOrderResponse

type UnifiedOrderResponse struct {
	XMLName    xml.Name `form:"-" json:"-" xml:"xml"`
	ReturnCode string   `form:"return_code" json:"return_code" xml:"return_code"`    //必填 返回状态码 SUCCESS/FAIL此字段是通信标识,非交易标识,交易是否成功需要查看result_code来判断
	ReturnMsg  string   `form:"return_msg" json:"return_msg" xml:"return_msg"`       //返回信息,如非空,为错误原因 签名失败 参数格式校验错误
	AppId      string   `form:"appid" json:"appid" xml:"appid"`                      //必填 应用APPID 在return_code为SUCCESS的时候有返回
	MchId      string   `form:"mch_id" json:"mch_id" xml:"mch_id"`                   //必填 商户号 在return_code为SUCCESS的时候有返回
	DeviceInfo string   `form:"device_info" json:"device_info" xml:"device_info"`    //设备号 在return_code为SUCCESS的时候有返回
	NonceStr   string   `form:"nonce_str" json:"nonce_str" xml:"nonce_str"`          //必填 随机字符串 在return_code为SUCCESS的时候有返回
	PrepayId   string   `form:"prepay_id" json:"prepay_id" xml:"prepay_id"`          //必填 预支付交易会话标识 在return_code和result_code都为SUCCESS的时候有返回
	CodeUrl    string   `form:"code_url" json:"code_url" xml:"code_url"`             //trade_type为NATIVE时有返回,用于生成二维码,展示给用户进行扫码支付
	TradeType  string   `form:"trade_type" json:"trade_type" xml:"trade_type"`       //必填 交易类型 在return_code和result_code都为SUCCESS的时候有返回
	ResultCode string   `form:"result_code" json:"result_code" xml:"result_code"`    //必填 业务结果 在return_code为SUCCESS的时候有返回
	ErrCode    string   `form:"err_code" json:"err_code" xml:"err_code"`             //错误代码 在return_code为SUCCESS的时候有返回
	ErrCodeDes string   `form:"err_code_des" json:"err_code_des" xml:"err_code_des"` //错误代码描述 在return_code为SUCCESS的时候有返回
	Sign       string   `form:"sign" json:"sign" xml:"sign"`                         //必填 签名 在return_code为SUCCESS的时候有返回
}
================================================================================
  • UnifiedOrderResponse数据域结构
  • qq group: 582452342
  • email : 2091938785@qq.com
  • author : 美丽的地球啊 - mliu <xml> <return_code><![CDATA[SUCCESS]]></return_code> <return_msg><![CDATA[OK]]></return_msg> <appid><![CDATA[wx2421b1c4370ec43b]]></appid> <mch_id><![CDATA[10000100]]></mch_id> <nonce_str><![CDATA[IITRi8Iabbblz1Jc]]></nonce_str> <sign><![CDATA[7921E432F65EB8ED0CE9755F0E86D72F]]></sign> <result_code><![CDATA[SUCCESS]]></result_code> <prepay_id><![CDATA[wx201411101639507cbf6ffd8b0779950874]]></prepay_id> <trade_type><![CDATA[APP]]></trade_type> </xml>
  • ================================================================================

type UnifiedOrderResult

type UnifiedOrderResult struct {
	AppId     string `form:"appid" json:"appid" xml:"appid"`             //必填 微信开放平台审核通过的应用APPID
	PartnerId string `form:"partnerid" json:"partnerid" xml:"partnerid"` //必填 微信支付分配的商户号
	PrepayId  string `form:"prepayid" json:"prepayid" xml:"prepayid"`    //必填 微信返回的支付交易会话ID
	Package   string `form:"package" json:"package" xml:"package"`       //必填 暂填写固定值Sign=WXPay
	NonceStr  string `form:"noncestr" json:"noncestr" xml:"noncestr"`    //必填 随机字符串
	Timestamp string `form:"timestamp" json:"timestamp" xml:"timestamp"` //必填 时间戳 1970的秒数
	Sign      string `form:"sign" json:"sign" xml:"sign"`                //必填 签名
}
================================================================================

* UnifiedOrderResult数据域结构 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================

func (*UnifiedOrderResult) ToMap

func (s *UnifiedOrderResult) ToMap() map[string]string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 对象转成字典 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type WechatpayClient

type WechatpayClient struct {
	// contains filtered or unexported fields
}

================================================================================ * 微信支付签名工具模块 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================

func NewWechatpayClient

func NewWechatpayClient(appId, partnerId, apiSecret string) *WechatpayClient

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 创建Wechatpay客户端 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*WechatpayClient) GetNotifyResult

func (s *WechatpayClient) GetNotifyResult(httpRequest *http.Request) (*PayResultNotify, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取异步通知响应数据结果 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*WechatpayClient) GetUnifiedOrderResult

func (s *WechatpayClient) GetUnifiedOrderResult(
	unifiedOrderResponse *UnifiedOrderResponse) *UnifiedOrderResult

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取统一下单响应结果 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*WechatpayClient) GetUnifiedOrderXml

func (s *WechatpayClient) GetUnifiedOrderXml(
	outTradeNo, body string,
	amount float64,
	attach string,
	ip string,
	args ...*UnifiedOrderDetail) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取统一下单Xml字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*WechatpayClient) SetFeeType

func (s *WechatpayClient) SetFeeType(feeType string)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 设置货币类型(CNY:人民币) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*WechatpayClient) SetNotifyUrl

func (s *WechatpayClient) SetNotifyUrl(notifyUrl string)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 设置通知地址 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*WechatpayClient) SetTimeoutExpress

func (s *WechatpayClient) SetTimeoutExpress(timeoutExpress int)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 设置订单支付过期时间,单位小时(24) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*WechatpayClient) SetUnifiedOrderUrl

func (s *WechatpayClient) SetUnifiedOrderUrl(unifiedOrderUrl string)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 设置统一下单地址 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*WechatpayClient) UnifiedOrder

func (s *WechatpayClient) UnifiedOrder(
	outTradeNo, body string,
	amount float64,
	attach string,
	ip string,
	args ...*UnifiedOrderDetail) (*UnifiedOrderResponse, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 统一下单 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*WechatpayClient) UnifiedOrderRequestSign

func (s *WechatpayClient) UnifiedOrderRequestSign(
	unifiedOrderRequest *UnifiedOrderRequest) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取Api统一下单请求签名 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*WechatpayClient) UnifiedOrderResultSign

func (s *WechatpayClient) UnifiedOrderResultSign(
	unifiedOrderResult *UnifiedOrderResult) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取Api统一下单结果签名 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL