|
|
@@ -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) { |
|
|
|