|
|
@@ -158,9 +158,7 @@ func CommAlipayConfig(c *gin.Context, p *md.AliPayPayParams) (map[string]string, |
|
|
|
"rsa": db.SysCfgGet(c, "pay_ali_key_len_type"), |
|
|
|
"pkcs": db.SysCfgGet(c, "pay_ali_key_format_type"), |
|
|
|
} |
|
|
|
if req["private_key"] == "" || req["app_id"] == "" { |
|
|
|
return req, e.NewErr(400, "请在后台正确配置支付宝") |
|
|
|
} |
|
|
|
|
|
|
|
if req["pay_ali_use_type"] == "1" { |
|
|
|
req["private_key"] = db.SysCfgGet(c, "pay_ali_new_private_key") |
|
|
|
req["app_id"] = db.SysCfgGet(c, "pay_ali_new_app_id") |
|
|
@@ -185,6 +183,9 @@ func CommAlipayConfig(c *gin.Context, p *md.AliPayPayParams) (map[string]string, |
|
|
|
} |
|
|
|
req["pay_alipayrsa_public_key"] = aliPayPublicCertSN |
|
|
|
} |
|
|
|
if req["private_key"] == "" || req["app_id"] == "" { |
|
|
|
return req, e.NewErr(400, "请在后台正确配置支付宝") |
|
|
|
} |
|
|
|
req["ord_id"] = p.OrdId |
|
|
|
req["amount"] = p.Amount |
|
|
|
req["subject"] = p.Subject |
|
|
|