Skip to content

Commit

Permalink
fix create customer
Browse files Browse the repository at this point in the history
  • Loading branch information
dmorejon committed Jul 7, 2022
1 parent c8af895 commit fdba4ff
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions customers/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ func (c *Client) Create(request *CreateRequest, params *checkout.Params) (*Creat
return response, err
}

var id string
err = json.Unmarshal(resp.ResponseBody, &id)
response.ID = id
var tempObject struct {
ID string `json:"id"`
}
err = json.Unmarshal(resp.ResponseBody, &tempObject)
response.ID = tempObject.ID

return response, err
}
Expand Down

0 comments on commit fdba4ff

Please sign in to comment.