Integrate global care #2

Merged
luuvansinh merged 13 commits from integrate-global-care into master 2022-09-12 08:13:42 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit f9046088ea - Show all commits

View File

@ -121,7 +121,7 @@ func (c *Client) CreateOrder(p CreateOrderPayload) (*CreateOrderResponseDecoded,
}
info, err := res.DecodeCreateOrderSuccess()
if err != nil {
log.Println("globalcare.Client.CreateOrder - DecodeCreateOrderSuccess err:", err)
log.Println("globalcare.Client.CreateOrder - DecodeCreateOrderSuccess err:", err, string(msg.Data))
return nil, err
}

View File

@ -10,19 +10,19 @@ type CommonResponse struct {
// DecodeCreateOrderSuccess ...
func (r *CommonResponse) DecodeCreateOrderSuccess() (res CreateOrderResponseDecoded, err error) {
err = r.Decode(res)
err = r.Decode(&res)
return res, err
}
// DecodeGetOrderSuccess ...
func (r *CommonResponse) DecodeGetOrderSuccess() (res GetOrderResponseDecoded, err error) {
err = r.Decode(res)
err = r.Decode(&res)
return res, err
}
// DecodeError ...
func (r *CommonResponse) DecodeError() (res ResponseError, err error) {
err = r.Decode(res)
err = r.Decode(&res)
return res, err
}