通联宝支付
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package tonglianpayapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
@@ -21,7 +20,7 @@ type CallBackResult struct {
|
||||
OuttrxID string `json:"outtrxID"`
|
||||
TrxCode string `json:"trxCode"`
|
||||
TrxID string `json:"trxID"`
|
||||
TrxAmt int64 `json:"trxAmt"`
|
||||
TrxAmt string `json:"trxAmt"`
|
||||
TrxDate string `json:"trxDate"`
|
||||
PayTime string `json:"payTime"`
|
||||
ChnlTrxID string `json:"chnlTrxID"`
|
||||
@@ -48,14 +47,11 @@ func (a *API) GetCallbackMsg(request *http.Request) (call *CallBackResult, err e
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fmt.Println("testCall", string(data))
|
||||
values, err := utils.HTTPBody2Values(data, false)
|
||||
fmt.Println("testCall", values)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
mapData := utils.URLValues2Map(values)
|
||||
fmt.Println("testCall", mapData)
|
||||
utils.Map2StructByJson(mapData, &call, false)
|
||||
return call, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user