更新支付方式请求参数

This commit is contained in:
wolter 2024-08-02 17:23:38 +08:00
parent 88b95cb67a
commit b8da95788b
2 changed files with 15 additions and 8 deletions

View File

@ -24,6 +24,10 @@ const (
// 商户 // 商户
MerchantNotFound = 1100 MerchantNotFound = 1100
AppNotFound = 1200
PayChannelNotFound = 1300
) )
var MsgEN = map[int]string{ var MsgEN = map[int]string{
@ -42,7 +46,9 @@ var MsgZH = map[int]string{
NotAuth: "未经授权", NotAuth: "未经授权",
NotLogin: "未登录", NotLogin: "未登录",
MerchantNotFound: "商户不存在", MerchantNotFound: "商户不存在",
AppNotFound: "应用不存在",
PayChannelNotFound: "支付方式不存在",
} }
var MsgMap map[string]map[int]string = map[string]map[int]string{"en": MsgZH} var MsgMap map[string]map[int]string = map[string]map[int]string{"en": MsgZH}

View File

@ -49,16 +49,17 @@ type PayChannelCreateRequest struct {
} }
type WechatPayChannel struct { type WechatPayChannel struct {
MchId string `json:"mch_id"` //直连商户号 MchId string `json:"mch_id"` // 商户ID 或者服务商模式的 sp_mchid
MchCertificateSerialNumber string `json:"mch_certificate_serial_number"` //商户证书序列号 SerialNo string `json:"serial_no"` // 商户证书的证书序列号
MchAPIv3Key string `json:"mch_APIv3_key"` //商户APIv3密钥 ApiV3Key string `json:"api_v_3_key"` // apiV3Key商户平台获取
PrivateKeyPath string `json:"private_key_path"` //商户私钥文件路径 PrivateKey string `json:"private_key"` // 私钥 apiclient_key.pem 读取后的内容
} }
type AliPayPayChannel struct { type AliPayPayChannel struct {
AliPublicKey string `json:"ali_public_key"` //支付宝公钥 PrivateKey string `json:"private_key"` // 应用私钥
PrivateKeyPath string `json:"private_key_path"` //应用私钥 AppPublicCert string `json:"app_public_cert"` // 应用公钥
SignType string `json:"sign_type"` //商户生成签名字符串所使用的签名算法类型目前支持RSA2和RSA推荐使用RSA2 AlipayRootCert string `json:"alipay_root_cert"` // 支付宝根证书
AlipayPublicCert string `json:"alipay_public_cert"` // 支付宝公钥
} }
func (p *PayChannelCreateRequest) RequestToDb() (db paychannelmodel.PayChannel, err error) { func (p *PayChannelCreateRequest) RequestToDb() (db paychannelmodel.PayChannel, err error) {