f
This commit is contained in:
@@ -400,6 +400,7 @@ alipay:
|
||||
# 💰 微信支付配置
|
||||
# ===========================================
|
||||
Wxpay:
|
||||
app_id: "wxa42614fcc7e5c50e"
|
||||
mch_id: "1111281099"
|
||||
mch_certificate_serial_number: "5E6FBBCB4C6C5378BEBA85D151A258CE0BE33A77"
|
||||
mch_apiv3_key: "7s9KpG2tR8aZcX5bN3mQ6wE4dF1hJ7Lq"
|
||||
|
||||
@@ -88,7 +88,7 @@ alipay:
|
||||
# 💰 微信支付配置
|
||||
# ===========================================
|
||||
Wxpay:
|
||||
app_id: "wxa581992dc74d860e"
|
||||
app_id: "wxa42614fcc7e5c50e"
|
||||
mch_id: "1683589176"
|
||||
mch_certificate_serial_number: "1F4E8B3C39C60035D4CC154F276D03D9CC2C603D"
|
||||
mch_apiv3_key: "TY8X9nP2qR5tY7uW3zA6bC4dE1flgGJ0"
|
||||
|
||||
@@ -101,6 +101,12 @@ alipay:
|
||||
notify_url: "https://console.haiyudata.com/api/v1/finance/alipay/callback"
|
||||
return_url: "https://console.haiyudata.com/api/v1/finance/alipay/return"
|
||||
|
||||
# ===========================================
|
||||
# 💰 微信支付配置
|
||||
# ===========================================
|
||||
Wxpay:
|
||||
app_id: "wxa42614fcc7e5c50e"
|
||||
|
||||
# ===========================================
|
||||
# 💰 钱包配置
|
||||
# ===========================================
|
||||
|
||||
@@ -509,6 +509,7 @@ type AliPayConfig struct {
|
||||
|
||||
// WxpayConfig 微信支付配置
|
||||
type WxpayConfig struct {
|
||||
AppID string `mapstructure:"app_id"`
|
||||
MchID string `mapstructure:"mch_id"`
|
||||
MchCertificateSerialNumber string `mapstructure:"mch_certificate_serial_number"`
|
||||
MchApiv3Key string `mapstructure:"mch_apiv3_key"`
|
||||
|
||||
@@ -231,6 +231,7 @@ func newWechatPayServiceWithWxPayPubKey(c config.Config, logger *zap.Logger) *We
|
||||
func (w *WechatPayService) CreateWechatNativeOrder(ctx context.Context, amount float64, description string, outTradeNo string) (interface{}, error) {
|
||||
totalAmount := ToWechatAmount(amount)
|
||||
req := native.PrepayRequest{
|
||||
Appid: core.String(w.config.Wxpay.AppID),
|
||||
Mchid: core.String(w.config.Wxpay.MchID),
|
||||
Description: core.String(description),
|
||||
OutTradeNo: core.String(outTradeNo),
|
||||
|
||||
Reference in New Issue
Block a user