huangjiajun hace 11 horas
padre
commit
f587e41b25
Se han modificado 1 ficheros con 4 adiciones y 3 borrados
  1. +4
    -3
      app/store/svc/svc_pay.go

+ 4
- 3
app/store/svc/svc_pay.go Ver fichero

@@ -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


Cargando…
Cancelar
Guardar