通联宝退款

This commit is contained in:
苏尹岚
2020-03-02 10:59:58 +08:00
parent 6ca352926d
commit d86659bc5c
2 changed files with 18 additions and 14 deletions

View File

@@ -1,9 +1,10 @@
package tonglianpayapi
import (
"encoding/json"
"io/ioutil"
"net/http"
"git.rosy.net.cn/baseapi/utils"
)
const (
@@ -43,9 +44,9 @@ type CallBackResult struct {
func (a *API) GetCallbackMsg(request *http.Request) (call *CallBackResult, err error) {
data, err := ioutil.ReadAll(request.Body)
json.Unmarshal(data, &call)
if err != nil {
return nil, err
}
utils.UnmarshalUseNumber(data, &call)
return call, err
}