core

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

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

CertificationType CertificationType

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
	ApiPrivateKey  *rsa.PrivateKey   // API证书私钥
	ApiCertificate *x509.Certificate // API证书
}

ApiCert ApiCert

type BasicInformation

type BasicInformation struct {
	MchID       string
	MchAPIv3Key string
	ApiCert     ApiCert
}

BasicInformation BasicInformation

func (BasicInformation) Join

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

Join Join

type Client

type Client interface {
	// Authorization 获取签名Authorization,由认证类型和签名信息组成
	Authorization(httpMethod string, urlString string, body []byte) (string, error)
	// Certificate 获取平台证书
	Certificate() (*custom.CertificateResp, error)
	// SetClientPlatformCert 设置平台证书
	SetClientPlatformCert(certificateStr string) error
	// RsaEncryptByPrivateKey 使用商户私钥加密敏感数据
	RsaEncryptByPrivateKey(origData []byte) (string, error)
	// RsaDecryptByPrivateKey 使用商户私钥解密敏感数据
	RsaDecryptByPrivateKey(ciphertext string) (string, error)
	// RsaEncryptByPublicKey 使用平台公钥加密敏感数据
	RsaEncryptByPublicKey(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)
	//PaymentRefund 基础支付-退款
	PaymentRefund(data custom.ReqPaymentRefund) (*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)
}

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证书
	PlatformSerialNo    string            // 平台证书序列号
	PlatformCertificate *x509.Certificate // 平台证书
	HttpClient          *http.Client
}

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            // apiV3密钥
	ApiSerialNo         string            // API证书序列号
	ApiPrivateKey       *rsa.PrivateKey   // API私钥
	ApiCertificate      *x509.Certificate // API证书
	PlatformSerialNo    string            // 平台证书序列号
	PlatformCertificate *x509.Certificate // 平台证书
	HttpClient          *http.Client
}

PayClient PayClient

func (*PayClient) AddProfitSharingReceiver added in v1.3.4

AddProfitSharingReceiver is AddProfitSharingReceiver

func (*PayClient) ApplyFundBill added in v1.3.5

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

ApplyFundBill 申请资金账单

func (*PayClient) ApplyProfitSharingBill added in v1.3.5

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

ApplyProfitSharingBill 申请分账账单

func (*PayClient) ApplyTransactionBill added in v1.3.5

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) Certificate

func (c *PayClient) Certificate() (*custom.CertificateResp, error)

Certificate Certificate

func (*PayClient) ContractQuery

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

ContractQuery ContractQuery

func (*PayClient) Decrypt

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

Decrypt Decrypt解密

func (*PayClient) DeleteProfitSharingReceiver added in v1.3.4

DeleteProfitSharingReceiver is DeleteProfitSharingReceiver

func (*PayClient) DissolveEduPaPayContract

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

func (*PayClient) DissolveEduSchoolPayContract added in v1.4.0

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

func (*PayClient) DissolveFaceUserContract

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

DissolveFaceUserContract DissolveFaceUserContract

func (*PayClient) DownloadBill added in v1.3.5

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 added in v1.4.0

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

func (*PayClient) EduSchoolPayContractQueryByOpenId added in v1.4.0

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

func (*PayClient) EduSchoolPayPreSign added in v1.4.0

func (*PayClient) EduSchoolPayQueryOrderByOutTradeNo added in v1.4.0

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

func (*PayClient) EduSchoolPayQueryOrderByTransactionId added in v1.4.0

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

func (*PayClient) EduSchoolPayTransactions added in v1.4.0

func (*PayClient) FaceMessageDecryption

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

FaceMessageDecryption FaceMessageDecryption

func (*PayClient) GetAuthInfo

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

GetAuthInfo GetAuthInfo

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 added in v1.3.5

IncomingSubmitApplication 提交进件申请单

func (*PayClient) InitiateProfitSharing added in v1.3.4

InitiateProfitSharing is InitiateProfitSharing

func (*PayClient) InitiateProfitSharingReturnOrders added in v1.3.4

InitiateProfitSharingReturnOrders is InitiateProfitSharingReturnOrders

func (*PayClient) JSAPIOrders added in v1.3.8

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

JSAPIOrders 直连商户JSAPI下单

func (*PayClient) JSAPIOrdersForPartner added in v1.3.8

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

JSAPIOrdersForPartner 服务商JSAPI下单

func (*PayClient) ModifySettlement added in v1.3.5

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) PaymentQueryOrderByOutTradeNo added in v1.3.7

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

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

func (*PayClient) PaymentQueryOrderByTransactionId added in v1.3.7

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) PreSignature

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

PreSignature PreSignature

func (*PayClient) QueryFaceUserInfo

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

QueryFaceUserInfo QueryFaceUserInfo

func (*PayClient) QueryMaximumSplitRatio added in v1.3.4

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

QueryMaximumSplitRatio IS 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 added in v1.3.4

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

QueryProfitSharingResult IS QueryProfitSharingResult

func (*PayClient) QueryProfitSharingReturnOrders added in v1.3.4

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

QueryProfitSharingReturnOrders IS QueryProfitSharingReturnOrders

func (*PayClient) QueryRemainingFrozenAmount added in v1.3.4

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

QueryRemainingFrozenAmount IS 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) 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) RsaEncryptByPublicKey

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

RsaEncryptByPublicKey 使用平台公钥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 SetClientPlatformCert

func (*PayClient) Sign

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

Sign Sign

func (*PayClient) SmartGuideAssign added in v1.3.9

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

func (*PayClient) SmartGuideQuery added in v1.3.9

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

func (*PayClient) SmartGuideRegister added in v1.3.9

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

func (*PayClient) SmartGuideUpdate added in v1.3.9

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 added in v1.3.4

UnfreezeRemainingFunds is UnfreezeRemainingFunds

func (*PayClient) UpdateFaceUserInfo

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

UpdateFaceUserInfo UpdateFaceUserInfo

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 VerifyResponse

type PlatformCert

type PlatformCert struct {
	PlatformSerialNo    string
	PlatformCertificate *x509.Certificate
}

PlatformCert PlatformCert

func (PlatformCert) Join

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

Join Join

Jump to

Keyboard shortcuts

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