diff --git a/api/service/OrderInquiry.go b/api/service/OrderInquiry.go index a79e9b8..a7d4a6c 100644 --- a/api/service/OrderInquiry.go +++ b/api/service/OrderInquiry.go @@ -99,11 +99,10 @@ func (r *OrderInquiryService) CancelOrderInquiry(orderInquiryId int64) (bool, er if orderInquiry.PaymentAmountTotal > 0 { refundRequest := weChat.RefundRequest{ TransactionId: orderInquiry.EscrowTradeNo, - OutTradeNo: orderInquiry.InquiryNo, OutRefundNo: inquiryRefundNo, Reason: "客服取消", PaymentAmountTotal: int64(orderInquiry.PaymentAmountTotal * 100), - NotifyUrl: "https://dev.hospital.applets.igandanyiyuan.com/" + config.C.Wechat.PatientInquiryRefundNotifyUrl, + NotifyUrl: config.C.Wechat.RefundNotifyDomain + config.C.Wechat.PatientInquiryRefundNotifyUrl, } refund, err := refundRequest.Refund() diff --git a/config.yaml b/config.yaml index 3593c94..601a5a0 100644 --- a/config.yaml +++ b/config.yaml @@ -67,6 +67,7 @@ wechat: patient-product-refund-notify-url: callback/wxpay/product/refund patient-detection-pay-notify-url: callback/wxpay/detection/success patient-detection-refund-notify-url: callback/wxpay/detection/refund + refund-notify-domain: https://dev.hospital.applets.igandanyiyuan.com/ doctor-app-id: wxc83296720404aa7b doctor-app-secret: 817665d3763637fe66d56548f8484622 mch-id: 1636644248 diff --git a/config/wechat.go b/config/wechat.go index 0c9d728..232891d 100644 --- a/config/wechat.go +++ b/config/wechat.go @@ -9,6 +9,7 @@ type Wechat struct { PatientProductRefundNotifyUrl string `mapstructure:"patient-product-refund-notify-url" json:"patient-product-refund-notify-url" yaml:"patient-product-refund-notify-url"` PatientDetectionPayNotifyUrl string `mapstructure:"patient-detection-pay-notify-url" json:"patient-detection-pay-notify-url" yaml:"patient-detection-pay-notify-url"` PatientDetectionRefundNotifyUrl string `mapstructure:"patient-detection-refund-notify-url" json:"patient-detection-refund-notify-url" yaml:"patient-detection-refund-notify-url"` + RefundNotifyDomain string `mapstructure:"refund-notify-domain" json:"refund-notify-domain" yaml:"refund-notify-domain"` // 回调域名 DoctorAppId string `mapstructure:"doctor-app-id" json:"doctor-app-id" yaml:"doctor-app-id"` DoctorAppSecret string `mapstructure:"doctor-app-secret" json:"doctor-app-secret" yaml:"doctor-app-secret"` MchId string `mapstructure:"mch-id" json:"mch-id" yaml:"mch-id"` // 商户号