Integrate global care #2

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

View File

@ -1,6 +1,10 @@
package globalcare
import "encoding/json"
import (
"encoding/json"
"github.com/Selly-Modules/3pl/util/base64"
)
// CommonResponse ...
type CommonResponse struct {
@ -28,7 +32,8 @@ func (r *CommonResponse) DecodeError() (res ResponseError, err error) {
// Decode ...
func (r *CommonResponse) Decode(resultPointer interface{}) error {
return json.Unmarshal([]byte(r.Data), resultPointer)
b := base64.Decode(r.Data)
return json.Unmarshal(b, resultPointer)
}
// CreateOrderResponseDecoded ...