generated from PenaSide/GolangTemplate
fix: linter
This commit is contained in:
parent
f39e5a66f0
commit
c38b20ffc0
@ -157,10 +157,10 @@ func (receiver *Service) Pay(ctx context.Context, accessToken string, userID str
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
receiver.logger.Debug("tariffs for buy cart", zap.Any("trtr",tariffs))
|
receiver.logger.Debug("tariffs for buy cart", zap.Any("trtr", tariffs))
|
||||||
|
|
||||||
tariffsAmount := utils.CalculateCartPurchasesAmount(tariffs)
|
tariffsAmount := utils.CalculateCartPurchasesAmount(tariffs)
|
||||||
receiver.logger.Debug("tariffsAmount for buy cart", zap.Any("trtr",tariffsAmount))
|
receiver.logger.Debug("tariffsAmount for buy cart", zap.Any("trtr", tariffsAmount))
|
||||||
|
|
||||||
response, err := receiver.discountClient.Apply(ctx, &discount.ApplyDiscountRequest{
|
response, err := receiver.discountClient.Apply(ctx, &discount.ApplyDiscountRequest{
|
||||||
UserInformation: &discount.UserInformation{
|
UserInformation: &discount.UserInformation{
|
||||||
@ -176,8 +176,8 @@ func (receiver *Service) Pay(ctx context.Context, accessToken string, userID str
|
|||||||
receiver.logger.Error("failed to discount on <Pay> of <CartService>", zap.Error(err))
|
receiver.logger.Error("failed to discount on <Pay> of <CartService>", zap.Error(err))
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
receiver.logger.Debug("applyed discounts for buy cart", zap.Any("trtr",response))
|
receiver.logger.Debug("applyed discounts for buy cart", zap.Any("trtr", response))
|
||||||
|
|
||||||
if account.Wallet.Money < int64(response.Price) {
|
if account.Wallet.Money < int64(response.Price) {
|
||||||
receiver.logger.Error("insufficient funds on <Pay> of <CartService>")
|
receiver.logger.Error("insufficient funds on <Pay> of <CartService>")
|
||||||
|
Loading…
Reference in New Issue
Block a user