more logs
This commit is contained in:
@@ -31,11 +31,14 @@ const (
|
||||
KlarnaPlaygroundUrl = "https://api.playground.klarna.com"
|
||||
)
|
||||
|
||||
func (k *KlarnaClient) GetOrder(orderId string) (*CheckoutOrder, error) {
|
||||
func (k *KlarnaClient) GetOrder(ctx context.Context, orderId string) (*CheckoutOrder, error) {
|
||||
req, err := http.NewRequest("GET", k.Url+"/checkout/v3/orders/"+orderId, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
spanCtx, span := tracer.Start(ctx, "Get klarna order")
|
||||
defer span.End()
|
||||
req = req.WithContext(spanCtx)
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.SetBasicAuth(k.UserName, k.Password)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user