修改微信退款使用商户号问题,问诊使用新商户号2
This commit is contained in:
parent
3bda9ddde3
commit
c5ad64c474
@ -8,6 +8,7 @@ import (
|
||||
"github.com/wechatpay-apiv3/wechatpay-go/services/refunddomestic"
|
||||
"github.com/wechatpay-apiv3/wechatpay-go/utils"
|
||||
"hospital-admin-api/config"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type RefundRequest struct {
|
||||
@ -35,9 +36,10 @@ func (r RefundRequest) Refund(orderType int) (*refunddomestic.Refund, error) {
|
||||
return nil, errors.New("商户号错误")
|
||||
}
|
||||
|
||||
certsDir := "extend/weChat/certs/" + mchId + "/apiclient_key.pem"
|
||||
// certsDir := "extend/weChat/certs/" + mchId + "/apiclient_key.pem"
|
||||
|
||||
// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
|
||||
certsDir := filepath.Join("extend/weChat/certs", mchId, "/apiclient_key.pem")
|
||||
// certsDir := filepath.Join("extend/weChat/certs", "/1636644248/apiclient_key.pem")
|
||||
mchPrivateKey, err := utils.LoadPrivateKeyWithPath(certsDir)
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user