Browse Source

更新

master
huangjiajun 1 year ago
parent
commit
1d27112446
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      lib/local_wechat/api.go

+ 16
- 0
lib/local_wechat/api.go View File

@@ -66,6 +66,22 @@ func TradeAppRefund(client *wechat.Client, subject, transactionId, outRefundNo,
}
return wxRsp, resBm, nil
}
func TradeAppRefundQuery(client *wechat.Client, transactionId string) (*wechat.QueryRefundResponse, gopay.BodyMap, error) {
// 初始化 BodyMap
bm := make(gopay.BodyMap)
bm.Set("transaction_id", transactionId).
Set("nonce_str", util.GetRandomString(32)).
Set("sign_type", wechat.SignType_MD5)
wxRsp, resBm, err := client.QueryRefund(bm)
fmt.Println(wxRsp)
fmt.Println(resBm)
if err != nil {
xlog.Error(err)
fmt.Println(err)
return wxRsp, resBm, err
}
return wxRsp, resBm, nil
}

// TradeAppPay is 微信APP支付
func TradeAppPay(client *wechat.Client, subject, orderID, amount, notifyUrl string) (map[string]string, error) {


Loading…
Cancel
Save