diff --git a/internal/service/cart/cart.go b/internal/service/cart/cart.go index a67b946..8e2cfff 100644 --- a/internal/service/cart/cart.go +++ b/internal/service/cart/cart.go @@ -148,14 +148,16 @@ func (receiver *Service) Pay(ctx context.Context, accessToken string, userID str receiver.logger.Error("failed to find account on of ", zap.String("userID", userID), zap.Error(err)) return err } - + reciever.logger.Debug("account for buy cart", zap.Any(account)) tariffs, err := receiver.hubadminClient.GetTariffs(ctx, accessToken, account.Cart) if err != nil { receiver.logger.Error("failed to get tarrifs on of ", zap.Strings("cart", account.Cart), zap.Error(err)) return err } + reciever.logger.Debug("tariffs for buy cart", zap.Any(tariffs)) tariffsAmount := utils.CalculateCartPurchasesAmount(tariffs) + reciever.logger.Debug("tariffsAmount for buy cart", zap.Any(tariffsAmount)) response, err := receiver.discountClient.Apply(ctx, &discount.ApplyDiscountRequest{ UserInformation: &discount.UserInformation{ @@ -171,6 +173,7 @@ func (receiver *Service) Pay(ctx context.Context, accessToken string, userID str receiver.logger.Error("failed to discount on of ", zap.Error(err)) return err } + reciever.logger.Debug("applyed discounts for buy cart", zap.Any(response)) if account.Wallet.Money < int64(response.Price) { receiver.logger.Error("insufficient funds on of ")