更新支付方式请求参数
This commit is contained in:
		
							parent
							
								
									88b95cb67a
								
							
						
					
					
						commit
						b8da95788b
					
				| 
						 | 
				
			
			@ -24,6 +24,10 @@ const (
 | 
			
		|||
 | 
			
		||||
	// 商户
 | 
			
		||||
	MerchantNotFound = 1100
 | 
			
		||||
 | 
			
		||||
	AppNotFound = 1200
 | 
			
		||||
 | 
			
		||||
	PayChannelNotFound = 1300
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var MsgEN = map[int]string{
 | 
			
		||||
| 
						 | 
				
			
			@ -42,7 +46,9 @@ var MsgZH = map[int]string{
 | 
			
		|||
	NotAuth:    "未经授权",
 | 
			
		||||
	NotLogin:   "未登录",
 | 
			
		||||
 | 
			
		||||
	MerchantNotFound: "商户不存在",
 | 
			
		||||
	MerchantNotFound:   "商户不存在",
 | 
			
		||||
	AppNotFound:        "应用不存在",
 | 
			
		||||
	PayChannelNotFound: "支付方式不存在",
 | 
			
		||||
}
 | 
			
		||||
var MsgMap map[string]map[int]string = map[string]map[int]string{"en": MsgZH}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,16 +49,17 @@ type PayChannelCreateRequest struct {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
type WechatPayChannel struct {
 | 
			
		||||
	MchId                      string `json:"mch_id"`                        //直连商户号
 | 
			
		||||
	MchCertificateSerialNumber string `json:"mch_certificate_serial_number"` //商户证书序列号
 | 
			
		||||
	MchAPIv3Key                string `json:"mch_APIv3_key"`                 //商户APIv3密钥
 | 
			
		||||
	PrivateKeyPath             string `json:"private_key_path"`              //商户私钥文件路径
 | 
			
		||||
	MchId      string `json:"mch_id"`      //	商户ID 或者服务商模式的 sp_mchid
 | 
			
		||||
	SerialNo   string `json:"serial_no"`   //	商户证书的证书序列号
 | 
			
		||||
	ApiV3Key   string `json:"api_v_3_key"` //	apiV3Key,商户平台获取
 | 
			
		||||
	PrivateKey string `json:"private_key"` //	私钥 apiclient_key.pem 读取后的内容
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type AliPayPayChannel struct {
 | 
			
		||||
	AliPublicKey   string `json:"ali_public_key"`   //支付宝公钥
 | 
			
		||||
	PrivateKeyPath string `json:"private_key_path"` //应用私钥
 | 
			
		||||
	SignType       string `json:"sign_type"`        //商户生成签名字符串所使用的签名算法类型,目前支持RSA2和RSA,推荐使用RSA2
 | 
			
		||||
	PrivateKey       string `json:"private_key"`        //	应用私钥
 | 
			
		||||
	AppPublicCert    string `json:"app_public_cert"`    //	应用公钥
 | 
			
		||||
	AlipayRootCert   string `json:"alipay_root_cert"`   //	支付宝根证书
 | 
			
		||||
	AlipayPublicCert string `json:"alipay_public_cert"` //	支付宝公钥
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (p *PayChannelCreateRequest) RequestToDb() (db paychannelmodel.PayChannel, err error) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue