Documentation ¶
Index ¶
- type Amount
- type BodyParam
- type Central
- type CertificateDriver
- type CertificatesResult
- type Client
- func (c *Client) AesDecrypt(crypted string, nonce string, additionalData string) ([]byte, error)
- func (c *Client) CombineTransactionsJsapi(param *CombineTransactions) (*TransactionsResp, error)
- func (c *Client) DoRequest(method string, apiUri string, vs ...interface{}) error
- func (c *Client) LoadCertCentral(driver CertificateDriver, pemDataArr [][]byte) error
- func (c *Client) LoadMerchantPrivateKey(pemData []byte, serialNumber string) error
- func (c *Client) LoadMerchantPrivateKeyFromFile(filePath string, serialNumber string) error
- func (c *Client) MediaUpload(param *FileParam) (*UploadResp, error)
- func (c *Client) TransactionsJsapi(param *TransactionsJsapi) (*TransactionsResp, error)
- type CombineAmount
- type CombineTransactions
- type CombineTransactionsH5Info
- type CombineTransactionsSceneInfo
- type CombineTransactionsSettleInfo
- type CombineTransactionsSubOrder
- type ErrorResult
- type FileLogger
- type FileParam
- type MemoryDriver
- type Payer
- type QueryParam
- type Result
- type TransactionsDetail
- type TransactionsGoodsDetail
- type TransactionsJsapi
- type TransactionsResp
- type TransactionsSceneInfo
- type UploadResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateDriver ¶
type CertificateDriver interface {
// contains filtered or unexported methods
}
CertificateDriver 证书中控存放驱动
type CertificatesResult ¶
type CertificatesResult struct { Data []struct { EffectiveTime string `json:"effective_time"` EncryptCertificate struct { Algorithm string `json:"algorithm"` AssociatedData string `json:"associated_data"` Ciphertext string `json:"ciphertext"` Nonce string `json:"nonce"` } `json:"encrypt_certificate"` ExpireTime string `json:"expire_time"` SerialNo string `json:"serial_no"` } `json:"data"` }
func (*CertificatesResult) IsSuccess ¶
func (r *CertificatesResult) IsSuccess() bool
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AesDecrypt ¶
AesDecrypt 解密
func (*Client) CombineTransactionsJsapi ¶
func (c *Client) CombineTransactionsJsapi(param *CombineTransactions) (*TransactionsResp, error)
CombineTransactionsJsapi 合单支付 JSAPI 下单
func (*Client) LoadCertCentral ¶
func (c *Client) LoadCertCentral(driver CertificateDriver, pemDataArr [][]byte) error
LoadCertCentral 加载微信证书中控
func (*Client) LoadMerchantPrivateKey ¶
LoadMerchantPrivateKey 加载商户私钥
func (*Client) LoadMerchantPrivateKeyFromFile ¶
LoadMerchantPrivateKeyFromFile 加载商户私钥
func (*Client) MediaUpload ¶
func (c *Client) MediaUpload(param *FileParam) (*UploadResp, error)
MediaUpload 图片上传
func (*Client) TransactionsJsapi ¶
func (c *Client) TransactionsJsapi(param *TransactionsJsapi) (*TransactionsResp, error)
TransactionsJsapi 基础支付 JSAPI 支付统一下单
type CombineAmount ¶
type CombineTransactions ¶
type CombineTransactions struct { CombineAppid string `json:"combine_appid"` CombineMchid string `json:"combine_mchid"` CombineOutTradeNo string `json:"combine_out_trade_no"` SceneInfo *CombineTransactionsSceneInfo `json:"scene_info,omitempty"` // *注:该值在合单 H5 下单时为必填 SubOrders []*CombineTransactionsSubOrder `json:"sub_orders"` CombinePayerInfo *Payer `json:"combine_payer_info"` TimeStart string `json:"time_start,omitempty"` TimeExpire string `json:"time_expire,omitempty"` NotifyUrl string `json:"notify_url"` }
func (*CombineTransactions) Params ¶
func (p *CombineTransactions) Params(client *Client) BodyParam
type CombineTransactionsSceneInfo ¶
type CombineTransactionsSceneInfo struct { DeviceId string `json:"device_id,omitempty"` PayerClientIp string `json:"payer_client_ip"` H5Info *CombineTransactionsH5Info `json:"h5_info,omitempty"` }
type CombineTransactionsSubOrder ¶
type CombineTransactionsSubOrder struct { Mchid string `json:"mchid"` Attach string `json:"attach"` Amount *CombineAmount `json:"amount"` OutTradeNo string `json:"out_trade_no"` SubMchId string `json:"sub_mchid"` Description string `json:"description"` SettleInfo *CombineTransactionsSettleInfo `json:"settle_info,omitempty"` }
type ErrorResult ¶
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
FileLogger 文件日志
type MemoryDriver ¶
type MemoryDriver struct {
// contains filtered or unexported fields
}
MemoryDriver 内存驱动,使用 sync.Map 存放
type QueryParam ¶
type TransactionsDetail ¶
type TransactionsDetail struct { CostPrice uint `json:"cost_price,omitempty"` InvoiceId string `json:"invoice_id,omitempty"` GoodsDetail *TransactionsGoodsDetail `json:"goods_detail,omitempty"` }
type TransactionsGoodsDetail ¶
type TransactionsJsapi ¶
type TransactionsJsapi struct { Appid string `json:"appid"` Mchid string `json:"mchid"` Description string `json:"description"` OutTradeNo string `json:"out_trade_no"` TimeExpire string `json:"time_expire,omitempty"` Attach string `json:"attach,omitempty"` NotifyUrl string `json:"notify_url"` GoodsTag string `json:"goods_tag,omitempty"` Amount *Amount `json:"amount"` Payer *Payer `json:"payer"` Detail *TransactionsDetail `json:"detail,omitempty"` SceneInfo *TransactionsSceneInfo `json:"scene_info,omitempty"` }
func (*TransactionsJsapi) Params ¶
func (p *TransactionsJsapi) Params(client *Client) BodyParam
type TransactionsResp ¶
type TransactionsResp struct {
PrepayId string `json:"prepay_id"`
}
func (*TransactionsResp) IsSuccess ¶
func (*TransactionsResp) IsSuccess() bool
type TransactionsSceneInfo ¶
type TransactionsSceneInfo struct { PayerClientIp string `json:"payer_client_ip"` DeviceId string `json:"device_id,omitempty"` StoreInfo struct { Id string `json:"id"` Name string `json:"name,omitempty"` AreaCode string `json:"area_code,omitempty"` Address string `json:"address,omitempty"` } `json:"store_info,omitempty"` }
type UploadResp ¶
type UploadResp struct {
MediaId string `json:"media_id"`
}
func (*UploadResp) IsSuccess ¶
func (u *UploadResp) IsSuccess() bool
Click to show internal directories.
Click to hide internal directories.