|
|
@@ -99,6 +99,23 @@ func TradeShowQuery(client *wechat.Client, transactionId string) (*wechat.QueryO |
|
|
|
return wxRsp, resBm, nil |
|
|
|
} |
|
|
|
|
|
|
|
func TradeShowRefundQuery(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) { |
|
|
|
// 初始化 BodyMap |
|
|
|