From 82b88cbaf569a8d6585affc95f1d5bf65b19ab58 Mon Sep 17 00:00:00 2001 From: Bastian de Byl Date: Sun, 26 Feb 2023 02:14:57 -0500 Subject: [PATCH] fixed data Put in UpdateOrder again with bytes buffer --- snipcart/snipcart.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snipcart/snipcart.go b/snipcart/snipcart.go index c03e674..22dec1c 100644 --- a/snipcart/snipcart.go +++ b/snipcart/snipcart.go @@ -1,6 +1,7 @@ package snipcart import ( + "bytes" "encoding/base64" "encoding/json" "errors" @@ -143,7 +144,7 @@ func (s *SnipcartProvider) UpdateOrder(orderUpdate *SnipcartOrderUpdate) (*Snipc if err != nil { return nil, err } - response, err := helper.Put(orderUri+"/"+orderUpdate.Token, "Basic", s.AuthBase64, updateJson) + response, err := helper.Put(orderUri+"/"+orderUpdate.Token, "Basic", s.AuthBase64, bytes.NewBuffer(updateJson)) if err != nil { return nil, err }