core

package
v0.0.0-...-a5250c6 Latest Latest
Warning

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

Go to latest
Published: May 4, 2025 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const CertificationType = "WECHATPAY2-SHA256-RSA2048"

Variables

This section is empty.

Functions

func CreateForm

func CreateForm(key, contentType string, w *multipart.Writer) (io.Writer, error)

CreateForm CreateForm

func CreateFormFile

func CreateFormFile(fieldName, filename, contentType string, w *multipart.Writer) (io.Writer, error)

CreateFormFile CreateFormFile

func GetCertificateSerialNumber

func GetCertificateSerialNumber(certificate x509.Certificate) string

GetCertificateSerialNumber 从证书中获取证书序列号

func IsCertExpired

func IsCertExpired(certificate x509.Certificate, now time.Time) bool

IsCertExpired 判定证书在特定时间是否过期

func IsCertValid

func IsCertValid(certificate x509.Certificate, now time.Time) bool

IsCertValid 判定证书在特定时间是否有效

func LoadCertificate

func LoadCertificate(certificateStr string) (certificate *x509.Certificate, err error)

LoadCertificate 通过证书的文本内容加载证书

func LoadCertificateWithPath

func LoadCertificateWithPath(path string) (certificate *x509.Certificate, err error)

LoadCertificateWithPath 通过证书的文件路径加载证书

func LoadPrivateKey

func LoadPrivateKey(privateKeyStr string) (privateKey *rsa.PrivateKey, err error)

LoadPrivateKey 通过私钥的文本内容加载私钥

func LoadPrivateKeyWithPath

func LoadPrivateKeyWithPath(path string) (privateKey *rsa.PrivateKey, err error)

LoadPrivateKeyWithPath 通过私钥的文件路径加载私钥

func LoadPublicKey

func LoadPublicKey(publicKeyStr string) (publicKey *rsa.PublicKey, err error)

LoadPublicKey 通过公钥的文本内容加载公钥

func LoadPublicKeyWithPath

func LoadPublicKeyWithPath(path string) (publicKey *rsa.PublicKey, err error)

LoadPublicKeyWithPath 通过公钥的文件路径加载公钥

func NewRequest

func NewRequest(authorization string, url string, method string, body io.Reader) (*http.Request, error)

NewRequest NewRequest

func SimpleRequest

func SimpleRequest(client *http.Client, url string, method string, authorization string, body []byte, platformSerialNo string) (*http.Response, error)

SimpleRequest SimpleRequest

func WithBaseHeader

func WithBaseHeader(req *http.Request, authorization string) *http.Request

WithBaseHeader WithBaseHeader

Types

type ApiCert

type ApiCert struct {
	ApiSerialNo    string            // 商户API证书序列号
	ApiPrivateKey  *rsa.PrivateKey   // 商户API私钥
	ApiCertificate *x509.Certificate // 商户API证书
}

ApiCert 商户证书参数

type BasicInformation

type BasicInformation struct {
	MchID       string
	MchAPIv3Key string
	ApiCert     ApiCert
}

BasicInformation 基础参数

func (BasicInformation) Join

func (w BasicInformation) Join(o *DialSettings) error

Join as join

type Client

type Client interface {
	// Authorization 获取签名Authorization,由认证类型和签名信息组成
	Authorization(httpMethod string, urlString string, body []byte) (string, error)

	// GetCertificate 获取微信支付平台证书
	GetCertificate() ([]custom.CertificateData, error)
	// GetAndSetCertificate 获取并设置微信支付平台证书
	GetAndSetCertificate() ([]custom.CertificateData, error)
	// SetClientPlatformCert 设置微信支付平台证书
	SetClientPlatformCert(certificateStr []string) error
	// RsaEncryptByPrivateKey 使用商户私钥加密敏感数据
	RsaEncryptByPrivateKey(origData []byte) (string, error)
	// RsaDecryptByPrivateKey 使用商户私钥解密敏感数据
	RsaDecryptByPrivateKey(ciphertext string) (string, error)
	// RsaEncryptByWxPayPubCertKey 使用微信支付平台证书公钥RSA加密
	RsaEncryptByWxPayPubCertKey(plaintext string) (string, error)
	// RsaEncryptByWxPayPubKey 使用微信支付平台公钥RSA加密
	RsaEncryptByWxPayPubKey(plaintext string) (string, error)
	// Decrypt 通知密文数据使用V3Key解密 (AES_256_GCM)
	Decrypt(algorithm string, cipherText string, associatedData string, nonce string) ([]byte, error)

	// UploadImage 上传图片(获取MediaId)
	UploadImage(filePath string) (*custom.RespUploadImage, error)

	DownloadBill(downloadUrl string) ([]byte, error)

	//IncomingSubmitApplication 提交进件申请单
	IncomingSubmitApplication(data custom.ReqIncomingSubmitApplication) (*custom.RespIncomingSubmitApplication, error)
	//ModifySettlement 修改结算账号
	ModifySettlement(subMchid string, data custom.ReqModifySettlement) error
	// QuerySettlementAccount 查询结算账户
	QuerySettlementAccount(subMchid string) (*custom.SettlementAccount, error)
	// GetStatusRepairOrderByBusinessCode 通过业务申请编号查询申请状态
	GetStatusRepairOrderByBusinessCode(businessCode string) (*custom.RespGetStatusRepairOrder, error)
	// GetStatusRepairOrderByApplymentId 通过申请单号查询申请状态
	GetStatusRepairOrderByApplymentId(applymentId string) (*custom.RespGetStatusRepairOrder, error)

	//InitiateProfitSharing 发起分账请求(注意,默认会做敏感数据加密) 兼容服务商、直连商户
	InitiateProfitSharing(data custom.ReqInitiateProfitSharing) (*custom.RespInitiateProfitSharing, error)
	//QueryProfitSharingResult 查询分账结果
	QueryProfitSharingResult(subMchid, transactionId, outOrderNo string) (*custom.RespQueryProfitSharingResult, error)
	//InitiateProfitSharingReturnOrders 请求分账回退
	InitiateProfitSharingReturnOrders(data custom.ReqInitiateProfitSharingReturnOrders) (*custom.RespInitiateProfitSharingReturnOrders, error)
	//QueryProfitSharingReturnOrders 查询分账回退结果
	QueryProfitSharingReturnOrders(subMchid, outReturnNo, outOrderNo string) (*custom.RespQueryProfitSharingReturnOrders, error)
	//UnfreezeRemainingFunds 解冻剩余资金
	UnfreezeRemainingFunds(data custom.ReqUnfreezeRemainingFunds) (*custom.RespUnfreezeRemainingFunds, error)
	//QueryRemainingFrozenAmount 查询订单待分金额
	QueryRemainingFrozenAmount(transactionId string) (*custom.RespQueryRemainingFrozenAmount, error)
	//QueryMaximumSplitRatio 查询子商户最大分账比例
	QueryMaximumSplitRatio(subMchid string) (*custom.RespQueryMaximumSplitRatio, error)
	//AddProfitSharingReceiver 添加分账接收方(注意,默认会做敏感数据加密) 兼容服务商、直连商户
	AddProfitSharingReceiver(data custom.ReqAddProfitSharingReceiver) (*custom.RespAddProfitSharingReceiver, error)
	//DeleteProfitSharingReceiver 删除分账接收方
	DeleteProfitSharingReceiver(data custom.ReqDeleteProfitSharingReceiver) (*custom.RespDeleteProfitSharingReceiver, error)
	//ApplyProfitSharingBill 申请分账账单
	ApplyProfitSharingBill(billDate, subMchid, tarType string) (*custom.RespApplyTransactionBill, error)

	//PaymentQueryOrderByTransactionId 查询订单-通过微信订单号(兼容服务商模式、直连商户模式)
	PaymentQueryOrderByTransactionId(transactionId, mchID string, subMchId ...string) (*custom.ReqPaymentQueryOrder, error)
	//PaymentQueryOrderByOutTradeNo 查询订单-通过商户订单号(兼容服务商模式、直连商户模式)
	PaymentQueryOrderByOutTradeNo(outTradeNo, mchID string, subMchId ...string) (*custom.ReqPaymentQueryOrder, error)
	//PaymentCloseOrder 关闭订单(兼容服务商模式、直连商户模式)
	PaymentCloseOrder(outTradeNo, mchID string, subMchId ...string) error
	//PaymentRefund 直连商户退款
	PaymentRefund(data custom.ReqPaymentRefund) (*custom.RespPaymentRefund, error)
	//PaymentRefundForPartner 服务商退款
	PaymentRefundForPartner(data custom.ReqPaymentRefundForPartner) (*custom.RespPaymentRefund, error)
	//ApplyTransactionBill //申请交易账单
	ApplyTransactionBill(billDate, subMchid, billType, tarType string) (*custom.RespApplyTransactionBill, error)
	//ApplyFundBill //申请资金账单
	ApplyFundBill(billDate, accountType, tarType string) (*custom.RespApplyTransactionBill, error)
	//JSAPIOrders 直连商户JSAPI下单
	JSAPIOrders(data custom.ReqJSAPIOrders) (*custom.RespJSAPIOrders, error)
	//JSAPIOrdersForPartner 服务商JSAPI下单
	JSAPIOrdersForPartner(data custom.ReqJSAPIOrdersForPartner) (*custom.RespJSAPIOrders, error)

	// EduPaPayPresign 教培续费通预签约
	EduPaPayPresign(data custom.ReqEduPaPayPresign) (*custom.RespEduPaPayPresign, error)
	// EduPaPayContractQueryById 通过协议号查询教培续费通签约
	EduPaPayContractQueryById(contractId string, query url.Values) (*custom.RespEduPaPayContractQuery, error)
	// EduPaPayContractQueryByOpenId 通用户标识查询教培续费通签约
	EduPaPayContractQueryByOpenId(openid string, query url.Values) (*custom.RespEduPaPayContractQueryList, error)
	// DissolveEduPaPayContract 教培续费通解约
	DissolveEduPaPayContract(contractId string) error
	// SendEduPaPayNotifications 发送预扣款通知
	SendEduPaPayNotifications(contractId string, data custom.ReqSendEduPaPayNotifications) error
	// EduPaPayTransactions 教培通扣款受理
	EduPaPayTransactions(data custom.ReqEduPaPayTransactions) error
	// EduPaPayQueryOrderByTransactionId 教培通微信订单号查单
	EduPaPayQueryOrderByTransactionId(transactionId string, query url.Values) (*custom.RespEduPaPayQueryOrder, error)
	// EduPaPayQueryOrderByOutTradeNo 教培通商户订单号查单
	EduPaPayQueryOrderByOutTradeNo(outTradeNo string, query url.Values) (*custom.RespEduPaPayQueryOrder, error)

	// QueryOrganizationInfoById 获取机构信息(根据机构ID)
	QueryOrganizationInfoById(organizationId string) (*custom.RespOrganizationInfo, error)
	// QueryOrganizationInfoByName 获取机构信息(根据机构名称)
	QueryOrganizationInfoByName(organizationName string) (*custom.RespOrganizationInfo, error)
	// ObtainAuthToken 获取授权凭证
	ObtainAuthToken(data custom.ReqObtainAuthToken) (*custom.RespObtainAuthToken, error)
	// Deprecated: PayCredential 旧版扣款接口,已废弃
	PayCredential(data custom.ReqPayCredential) (*custom.RespPayCredential, error)
	// QueryFaceUserInfo 查询刷脸用户信息
	QueryFaceUserInfo(organizationId, outUserId string, isDecrypt ...bool) (*custom.RespQueryFaceUserInfo, error)
	// UpdateFaceUserInfo 修改刷脸用户信息
	UpdateFaceUserInfo(data custom.ReqUpdateUserInfo) error
	// DissolveFaceUserContract 解除刷脸用户签约关系
	DissolveFaceUserContract(organizationId, outUserId string) error
	// PreSignature 预签约
	PreSignature(data custom.ReqPresignToken) (*custom.RespPresignToken, error)
	// OfflineFaceTransactions 申请扣款
	OfflineFaceTransactions(data custom.ReqOfflinefaceTransactions) (*custom.RespOfflinefaceTransactions, error)
	// ContractQuery 签约查询
	ContractQuery(contractId, AppId string) (*custom.RespContractQuery, error)
	// FaceMessageDecryption 人脸报文(签约解约)消息解密
	FaceMessageDecryption(data custom.FaceMessageCiphertext) (*custom.FaceMessagePlaintext, error)
	// QueryRepurchaseUsersList 查询重采用户列表
	QueryRepurchaseUsersList(organizationId, offset, limit string) (*custom.RespQueryRepurchaseUsersList, error)
	// QueryRetake 查询重采
	QueryRetake(collectionId string) (*custom.FaceCollections, error)
	// QueryOfflineFaceOrders 离线人脸团餐专属查单
	QueryOfflineFaceOrders(outTradeNo, spMchid, subMchid, businessProductId string) (*custom.RespOfflinefaceTransactions, error)
	// GetAuthInfo 获取AuthInfo
	GetAuthInfo(data custom.ReqGetAuthInfo) (*custom.RespGetAuthInfo, error)
	// GetRepaymentUrl 获取还款链接
	GetRepaymentUrl(data custom.ReqGetRepaymentUrl) (*custom.RespGetRepaymentUrl, error)

	//SmartGuideRegister 服务人员注册
	SmartGuideRegister(data custom.ReqSmartGuideRegister) (*custom.RespSmartGuideRegister, error)
	//SmartGuideAssign 服务人员分配
	SmartGuideAssign(guideId string, data custom.ReqSmartGuideAssign) error
	//SmartGuideQuery 服务人员查询
	SmartGuideQuery(storeId, subMchid, userId, mobile, workId, limit, offset string) (*custom.RespSmartGuideQuery, error)
	//SmartGuideUpdate 服务人员信息更新
	SmartGuideUpdate(guideId string, data custom.ReqSmartGuideUpdate) error

	// EduSchoolPayPreSign 校园轻松付预签约
	EduSchoolPayPreSign(data custom.ReqEduSchoolPayPreSign) (*custom.RespEduSchoolPayPreSign, error)
	// EduSchoolPayContractQueryById 校园轻松付通过协议号查询签约
	EduSchoolPayContractQueryById(contractId string) (*custom.RespEduSchoolPayContractQuery, error)
	// DissolveEduSchoolPayContract 校园轻松付解约
	DissolveEduSchoolPayContract(contractId string) error
	// EduSchoolPayContractQueryByOpenId 校园轻松付查询用户签约列表
	EduSchoolPayContractQueryByOpenId(openId string, query url.Values) (*custom.RespEduSchoolPayContractQueryPage, error)
	// EduSchoolPayTransactions 校园轻松付扣款
	EduSchoolPayTransactions(data custom.ReqEduSchoolPayTransactions) (*custom.RespEduSchoolPayTransactions, error)
	// EduSchoolPayQueryOrderByTransactionId 校园轻松付微信支付订单号查单
	EduSchoolPayQueryOrderByTransactionId(transactionId string, query url.Values) (*custom.RespEduSchoolPayTransactions, error)
	// EduSchoolPayQueryOrderByOutTradeNo 校园轻松付商户订单号查单
	EduSchoolPayQueryOrderByOutTradeNo(outTradeNo string, query url.Values) (*custom.RespEduSchoolPayTransactions, error)

	//QueryViolationNotifications 查询商户违规通知回调地址
	QueryViolationNotifications() (*custom.GeneralViolationNotifications, error)
	//CreateViolationNotifications 创建商户违规通知回调地址
	CreateViolationNotifications(data custom.GeneralViolationNotifications) (*custom.GeneralViolationNotifications, error)
	//UpdateViolationNotifications 修改商户违规通知回调地址
	UpdateViolationNotifications(data custom.GeneralViolationNotifications) (*custom.GeneralViolationNotifications, error)
	//DeleteViolationNotifications 删除商户违规通知回调地址
	DeleteViolationNotifications() error

	// QueryComplaintsList 查询投诉单列表(兼容服务商模式、直连商户模式)
	QueryComplaintsList(beginDate, endDate string, limit, offset int, mchId ...string) (*custom.RespComplaintsList, error)
}

Client is Client

type ClientOption

type ClientOption interface {
	Join(settings *DialSettings) error
}

ClientOption 微信支付 API v3 HTTPClient core.Client 初始化参数

type DialSettings

type DialSettings struct {
	MchId                string                       // 商户号
	ApiV3Key             string                       // apiV3密钥
	ApiSerialNo          string                       // API证书序列号
	ApiPrivateKey        *rsa.PrivateKey              // API证书私钥
	ApiCertificate       *x509.Certificate            // API证书(非必须,可获取证书序列号和商户API公钥)
	DefaultSerialNo      string                       // 默认平台证书序列号
	PlatformCertMap      map[string]*x509.Certificate // 平台证书集合
	WechatPayPublicKeyID string                       // 平台公钥ID
	WechatPayPublicKey   *rsa.PublicKey               // 平台公钥
	HttpClient           *http.Client                 // http客户端
}

DialSettings DialSettings

func (*DialSettings) Validate

func (ds *DialSettings) Validate() error

Validate 校验请求配置是否有效

type ErrResponseBody

type ErrResponseBody struct {
	HttpStatus int             `json:"http_status"`
	Code       string          `json:"code"`
	Message    string          `json:"message"`
	ReqId      string          `json:"req_id"`
	Detail     json.RawMessage `json:"detail"`
}

ErrResponseBody ErrResponseBody

func (*ErrResponseBody) Error

func (r *ErrResponseBody) Error() string

type ErrorOption

type ErrorOption struct{ Error error }

ErrorOption 错误初始化参数,用于返回错误

func (ErrorOption) Join

func (w ErrorOption) Join(_ *DialSettings) error

Join 返回初始化错误

type PayClient

type PayClient struct {
	MchId                   string                       // 商户号
	ApiV3Key                string                       // ApiV3Key密钥,用于解密回调通知的密文数据,平台证书密文
	ApiSerialNo             string                       // API证书序列号
	ApiPrivateKey           *rsa.PrivateKey              // API证书私钥
	ApiCertificate          *x509.Certificate            // API证书(非必须,可获取证书序列号和商户API公钥)
	DefaultPlatformSerialNo string                       // 默认平台证书序列号
	PlatformCertMap         map[string]*x509.Certificate // 平台证书集合
	WechatPayPublicKeyID    string                       // 平台公钥ID
	WechatPayPublicKey      *rsa.PublicKey               // 平台公钥
	HttpClient              *http.Client                 // http客户端
}

PayClient PayClient

func (*PayClient) AddProfitSharingReceiver

AddProfitSharingReceiver 添加分账接收方(注意,默认会做敏感数据加密)

func (*PayClient) ApplyFundBill

func (c *PayClient) ApplyFundBill(billDate, accountType, tarType string) (*custom.RespApplyTransactionBill, error)

ApplyFundBill 申请资金账单

func (*PayClient) ApplyProfitSharingBill

func (c *PayClient) ApplyProfitSharingBill(billDate, subMchid, tarType string) (*custom.RespApplyTransactionBill, error)

ApplyProfitSharingBill 申请分账账单

func (*PayClient) ApplyTransactionBill

func (c *PayClient) ApplyTransactionBill(billDate, subMchid, billType, tarType string) (*custom.RespApplyTransactionBill, error)

ApplyTransactionBill 申请交易账单

func (*PayClient) Authorization

func (c *PayClient) Authorization(httpMethod string, urlString string, body []byte) (string, error)

Authorization 获取WechatPayV3的header信息Authorization

func (*PayClient) ContractQuery

func (c *PayClient) ContractQuery(contractId, AppId string) (*custom.RespContractQuery, error)

ContractQuery ContractQuery

func (*PayClient) CreateViolationNotifications

func (c *PayClient) CreateViolationNotifications(data custom.GeneralViolationNotifications) (*custom.GeneralViolationNotifications, error)

CreateViolationNotifications 创建商户违规通知回调地址

func (*PayClient) Decrypt

func (c *PayClient) Decrypt(algorithm string, cipherText string, associatedData string, nonce string) ([]byte, error)

Decrypt Decrypt解密

func (*PayClient) DeleteProfitSharingReceiver

DeleteProfitSharingReceiver 删除分账接受方

func (*PayClient) DeleteViolationNotifications

func (c *PayClient) DeleteViolationNotifications() error

DeleteViolationNotifications 删除商户违规通知回调地址

func (*PayClient) DissolveEduPaPayContract

func (c *PayClient) DissolveEduPaPayContract(contractId string) error

func (*PayClient) DissolveEduSchoolPayContract

func (c *PayClient) DissolveEduSchoolPayContract(contractId string) error

func (*PayClient) DissolveFaceUserContract

func (c *PayClient) DissolveFaceUserContract(organizationId, outUserId string) error

DissolveFaceUserContract 解约

func (*PayClient) DownloadBill

func (c *PayClient) DownloadBill(downloadUrl string) ([]byte, error)

DownloadBill 下载账单

func (*PayClient) EduPaPayContractQueryById

func (c *PayClient) EduPaPayContractQueryById(contractId string, query url.Values) (*custom.RespEduPaPayContractQuery, error)

EduPaPayContractQueryById EduPaPayContractQueryById

func (*PayClient) EduPaPayContractQueryByOpenId

func (c *PayClient) EduPaPayContractQueryByOpenId(openid string, query url.Values) (*custom.RespEduPaPayContractQueryList, error)

EduPaPayContractQueryByOpenId EduPaPayContractQueryByOpenId

func (*PayClient) EduPaPayPresign

func (c *PayClient) EduPaPayPresign(data custom.ReqEduPaPayPresign) (*custom.RespEduPaPayPresign, error)

EduPaPayPresign EduPaPayPresign

func (*PayClient) EduPaPayQueryOrderByOutTradeNo

func (c *PayClient) EduPaPayQueryOrderByOutTradeNo(outTradeNo string, query url.Values) (*custom.RespEduPaPayQueryOrder, error)

func (*PayClient) EduPaPayQueryOrderByTransactionId

func (c *PayClient) EduPaPayQueryOrderByTransactionId(transactionId string, query url.Values) (*custom.RespEduPaPayQueryOrder, error)

func (*PayClient) EduPaPayTransactions

func (c *PayClient) EduPaPayTransactions(data custom.ReqEduPaPayTransactions) error

func (*PayClient) EduSchoolPayContractQueryById

func (c *PayClient) EduSchoolPayContractQueryById(contractId string) (*custom.RespEduSchoolPayContractQuery, error)

func (*PayClient) EduSchoolPayContractQueryByOpenId

func (c *PayClient) EduSchoolPayContractQueryByOpenId(openId string, query url.Values) (*custom.RespEduSchoolPayContractQueryPage, error)

func (*PayClient) EduSchoolPayPreSign

func (*PayClient) EduSchoolPayQueryOrderByOutTradeNo

func (c *PayClient) EduSchoolPayQueryOrderByOutTradeNo(outTradeNo string, query url.Values) (*custom.RespEduSchoolPayTransactions, error)

func (*PayClient) EduSchoolPayQueryOrderByTransactionId

func (c *PayClient) EduSchoolPayQueryOrderByTransactionId(transactionId string, query url.Values) (*custom.RespEduSchoolPayTransactions, error)

func (*PayClient) EduSchoolPayTransactions

func (*PayClient) FaceMessageDecryption

func (c *PayClient) FaceMessageDecryption(data custom.FaceMessageCiphertext) (*custom.FaceMessagePlaintext, error)

FaceMessageDecryption FaceMessageDecryption

func (*PayClient) GetAndSetCertificate

func (c *PayClient) GetAndSetCertificate() ([]custom.CertificateData, error)

GetAndSetCertificate 获取并设置微信平台证书(一步到位,从微信获取最新的平台证书,并设置到当前客户端)

func (*PayClient) GetAuthInfo

func (c *PayClient) GetAuthInfo(data custom.ReqGetAuthInfo) (*custom.RespGetAuthInfo, error)

GetAuthInfo GetAuthInfo

func (*PayClient) GetCertificate

func (c *PayClient) GetCertificate() ([]custom.CertificateData, error)

GetCertificate 获取微信平台证书(仅从微信获取最新的平台证书)

func (*PayClient) GetRepaymentUrl

func (c *PayClient) GetRepaymentUrl(data custom.ReqGetRepaymentUrl) (*custom.RespGetRepaymentUrl, error)

GetRepaymentUrl GetRepaymentUrl

func (*PayClient) GetStatusRepairOrderByApplymentId

func (c *PayClient) GetStatusRepairOrderByApplymentId(applymentId string) (*custom.RespGetStatusRepairOrder, error)

GetStatusRepairOrderByApplymentId 通过申请单号查询申请状态

func (*PayClient) GetStatusRepairOrderByBusinessCode

func (c *PayClient) GetStatusRepairOrderByBusinessCode(businessCode string) (*custom.RespGetStatusRepairOrder, error)

GetStatusRepairOrderByBusinessCode 通过业务申请编号查询申请状态

func (*PayClient) IncomingSubmitApplication

IncomingSubmitApplication 提交进件申请单

func (*PayClient) InitiateProfitSharing

InitiateProfitSharing 请求分账(注意,默认会做敏感数据加密)

func (*PayClient) InitiateProfitSharingReturnOrders

InitiateProfitSharingReturnOrders is InitiateProfitSharingReturnOrders

func (*PayClient) JSAPIOrders

func (c *PayClient) JSAPIOrders(data custom.ReqJSAPIOrders) (*custom.RespJSAPIOrders, error)

JSAPIOrders 直连商户JSAPI下单

func (*PayClient) JSAPIOrdersForPartner

func (c *PayClient) JSAPIOrdersForPartner(data custom.ReqJSAPIOrdersForPartner) (*custom.RespJSAPIOrders, error)

JSAPIOrdersForPartner 服务商JSAPI下单

func (*PayClient) ModifySettlement

func (c *PayClient) ModifySettlement(subMchid string, data custom.ReqModifySettlement) error

ModifySettlement 修改结算账号

func (*PayClient) ObtainAuthToken

func (c *PayClient) ObtainAuthToken(data custom.ReqObtainAuthToken) (*custom.RespObtainAuthToken, error)

ObtainAuthToken ObtainAuthToken

func (*PayClient) OfflineFaceTransactions

OfflineFaceTransactions OfflineFaceTransactions

func (*PayClient) PayCredential deprecated

func (c *PayClient) PayCredential(data custom.ReqPayCredential) (*custom.RespPayCredential, error)

Deprecated: PayCredential 旧版扣款接口,已废弃

func (*PayClient) PaymentCloseOrder

func (c *PayClient) PaymentCloseOrder(outTradeNo, mchID string, subMchId ...string) error

PaymentCloseOrder 关闭订单

func (*PayClient) PaymentQueryOrderByOutTradeNo

func (c *PayClient) PaymentQueryOrderByOutTradeNo(outTradeNo, mchID string, subMchId ...string) (*custom.ReqPaymentQueryOrder, error)

PaymentQueryOrderByOutTradeNo 查询订单-通过商户订单号

func (*PayClient) PaymentQueryOrderByTransactionId

func (c *PayClient) PaymentQueryOrderByTransactionId(transactionId, mchID string, subMchId ...string) (*custom.ReqPaymentQueryOrder, error)

PaymentQueryOrderByTransactionId 查询订单-通过微信订单号

func (*PayClient) PaymentRefund

func (c *PayClient) PaymentRefund(data custom.ReqPaymentRefund) (*custom.RespPaymentRefund, error)

PaymentRefund 直连商户申请退款

func (*PayClient) PaymentRefundForPartner

func (c *PayClient) PaymentRefundForPartner(data custom.ReqPaymentRefundForPartner) (*custom.RespPaymentRefund, error)

PaymentRefundForPartner 服务商申请退款

func (*PayClient) PreSignature

func (c *PayClient) PreSignature(data custom.ReqPresignToken) (*custom.RespPresignToken, error)

PreSignature PreSignature

func (*PayClient) QueryComplaintsList

func (c *PayClient) QueryComplaintsList(beginDate, endDate string, limit, offset int, mchId ...string) (*custom.RespComplaintsList, error)

func (*PayClient) QueryFaceUserInfo

func (c *PayClient) QueryFaceUserInfo(organizationId, outUserId string, isDecrypt ...bool) (*custom.RespQueryFaceUserInfo, error)

QueryFaceUserInfo QueryFaceUserInfo

func (*PayClient) QueryMaximumSplitRatio

func (c *PayClient) QueryMaximumSplitRatio(subMchid string) (*custom.RespQueryMaximumSplitRatio, error)

QueryMaximumSplitRatio 查询最大分账比例

func (*PayClient) QueryOfflineFaceOrders

func (c *PayClient) QueryOfflineFaceOrders(outTradeNo, spMchid, subMchid, businessProductId string) (*custom.RespOfflinefaceTransactions, error)

QueryOfflineFaceOrders QueryOfflineFaceOrders

func (*PayClient) QueryOrganizationInfoById

func (c *PayClient) QueryOrganizationInfoById(organizationId string) (*custom.RespOrganizationInfo, error)

QueryOrganizationInfoById is QueryOrganizationInfoById

func (*PayClient) QueryOrganizationInfoByName

func (c *PayClient) QueryOrganizationInfoByName(organizationName string) (*custom.RespOrganizationInfo, error)

QueryOrganizationInfoByName is QueryOrganizationInfoByName

func (*PayClient) QueryProfitSharingResult

func (c *PayClient) QueryProfitSharingResult(subMchid, transactionId, outOrderNo string) (*custom.RespQueryProfitSharingResult, error)

QueryProfitSharingResult 查询分账结果

func (*PayClient) QueryProfitSharingReturnOrders

func (c *PayClient) QueryProfitSharingReturnOrders(subMchid, outReturnNo, outOrderNo string) (*custom.RespQueryProfitSharingReturnOrders, error)

QueryProfitSharingReturnOrders IS QueryProfitSharingReturnOrders

func (*PayClient) QueryRemainingFrozenAmount

func (c *PayClient) QueryRemainingFrozenAmount(transactionId string) (*custom.RespQueryRemainingFrozenAmount, error)

QueryRemainingFrozenAmount 查询剩余冻结金额

func (*PayClient) QueryRepurchaseUsersList

func (c *PayClient) QueryRepurchaseUsersList(organizationId, offset, limit string) (*custom.RespQueryRepurchaseUsersList, error)

QueryRepurchaseUsersList QueryRepurchaseUsersList

func (*PayClient) QueryRetake

func (c *PayClient) QueryRetake(collectionId string) (*custom.FaceCollections, error)

QueryRetake QueryRetake

func (*PayClient) QuerySettlementAccount

func (c *PayClient) QuerySettlementAccount(subMchid string) (*custom.SettlementAccount, error)

QuerySettlementAccount 查询结算账户

func (*PayClient) QueryViolationNotifications

func (c *PayClient) QueryViolationNotifications() (*custom.GeneralViolationNotifications, error)

QueryViolationNotifications 查询商户违规通知回调地址

func (*PayClient) RsaDecryptByPrivateKey

func (c *PayClient) RsaDecryptByPrivateKey(ciphertext string) (string, error)

RsaDecryptByPrivateKey 使用商户私钥RSA解密

func (*PayClient) RsaEncryptByPrivateKey

func (c *PayClient) RsaEncryptByPrivateKey(origData []byte) (string, error)

RsaEncryptByPrivateKey 使用商户私钥RSA加密

func (*PayClient) RsaEncryptByWxPayPubCertKey

func (c *PayClient) RsaEncryptByWxPayPubCertKey(plaintext string) (string, error)

RsaEncryptByWxPayPubCertKey 使用微信支付平台证书公钥RSA加密

func (*PayClient) RsaEncryptByWxPayPubKey

func (c *PayClient) RsaEncryptByWxPayPubKey(plaintext string) (string, error)

RsaEncryptByWxPayPubKey 使用微信支付平台公钥RSA加密

func (*PayClient) SendEduPaPayNotifications

func (c *PayClient) SendEduPaPayNotifications(contractId string, data custom.ReqSendEduPaPayNotifications) error

func (*PayClient) SetClientPlatformCert

func (c *PayClient) SetClientPlatformCert(certificateStr []string) error

SetClientPlatformCert 设置客户端微信平台证书(通过证书字符串设置当前客户端的平台证书)

func (*PayClient) Sign

func (c *PayClient) Sign(message []byte) (string, error)

Sign 签名

func (*PayClient) SmartGuideAssign

func (c *PayClient) SmartGuideAssign(guideId string, data custom.ReqSmartGuideAssign) error

func (*PayClient) SmartGuideQuery

func (c *PayClient) SmartGuideQuery(storeId, subMchid, userId, mobile, workId, limit, offset string) (*custom.RespSmartGuideQuery, error)

func (*PayClient) SmartGuideRegister

func (c *PayClient) SmartGuideRegister(data custom.ReqSmartGuideRegister) (*custom.RespSmartGuideRegister, error)

func (*PayClient) SmartGuideUpdate

func (c *PayClient) SmartGuideUpdate(guideId string, data custom.ReqSmartGuideUpdate) error

func (*PayClient) Token

func (c *PayClient) Token(httpMethod string, rawUrl string, body []byte) (string, error)

Token 获取签名信息 请求方法为GET时,报文主体为空;当请求方法为POST或PUT时,请使用真实发送的JSON报文;图片上传API,请使用meta对应的JSON报文

func (*PayClient) UnfreezeRemainingFunds

UnfreezeRemainingFunds 解冻剩余资金

func (*PayClient) UpdateFaceUserInfo

func (c *PayClient) UpdateFaceUserInfo(data custom.ReqUpdateUserInfo) error

UpdateFaceUserInfo 更新人脸用户信息

func (*PayClient) UpdateViolationNotifications

func (c *PayClient) UpdateViolationNotifications(data custom.GeneralViolationNotifications) (*custom.GeneralViolationNotifications, error)

UpdateViolationNotifications 修改商户违规通知回调地址

func (*PayClient) UploadImage

func (c *PayClient) UploadImage(filePath string) (*custom.RespUploadImage, error)

UploadImage UploadImage

func (*PayClient) VerifyResponse

func (c *PayClient) VerifyResponse(httpStatus int, header *http.Header, body []byte) error

VerifyResponse 验签

type PlatformCert

type PlatformCert struct {
	DefaultSerialNo string // 默认平台证书序列号
	CertList        []custom.CertificateDataList
}

PlatformCert 微信平台证书参数

func (PlatformCert) Join

func (w PlatformCert) Join(o *DialSettings) error

Join as join

type PlatformPubKey

type PlatformPubKey struct {
	PubKeyId string         // 公钥ID
	PubKey   *rsa.PublicKey // 平台公钥
}

PlatformPubKey 微信平台公钥参数

func (PlatformPubKey) Join

func (w PlatformPubKey) Join(o *DialSettings) error

Join as join

Jump to

Keyboard shortcuts

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