generated from PenaSide/GolangTemplate
-
This commit is contained in:
parent
55660b7f58
commit
2a3cf5f10b
@ -173,7 +173,7 @@ func (receiver *CartController) Pay(ctx *fiber.Ctx) error {
|
||||
hlogger.Emit(models.InfoPayCart{
|
||||
CtxUserID: userID,
|
||||
CtxAccountID: account.ID,
|
||||
KeySuccess: false,
|
||||
KeySuccess: uint8(0),
|
||||
CtxPrice: int64(discountResponse.Price - uint64(account.Wallet.Money)),
|
||||
CtxTariff: strings.Join(account.Cart, ","),
|
||||
CtxDiscount: strings.Join(utils.GetAppliedDiscountsIDs(discountResponse.AppliedDiscounts), ","),
|
||||
@ -294,7 +294,7 @@ func (receiver *CartController) Pay(ctx *fiber.Ctx) error {
|
||||
hlogger.Emit(models.InfoPayCart{
|
||||
CtxUserID: userID,
|
||||
CtxAccountID: updatedAccount.ID,
|
||||
KeySuccess: true,
|
||||
KeySuccess: uint8(1),
|
||||
CtxPrice: int64(discountResponse.Price),
|
||||
CtxTariff: strings.Join(account.Cart, ","),
|
||||
CtxDiscount: strings.Join(utils.GetAppliedDiscountsIDs(discountResponse.AppliedDiscounts), ","),
|
||||
|
@ -15,7 +15,7 @@ type AllFields struct {
|
||||
CtxPhone string
|
||||
KeyCurrency string
|
||||
CtxTariffID string
|
||||
KeySuccess bool
|
||||
KeySuccess uint8
|
||||
|
||||
CtxPrice int64
|
||||
CtxTariff string
|
||||
@ -53,7 +53,7 @@ type InfoAddToCart struct {
|
||||
type InfoPayCart struct {
|
||||
CtxUserID string //айдишник юзера из токена
|
||||
CtxAccountID string // айдишник аккаунта
|
||||
KeySuccess bool // получилось оплатить или не хватило денег
|
||||
KeySuccess uint8 // получилось оплатить или не хватило денег
|
||||
CtxPrice int64 // сумма в копейках. если не удалось оплатить - записать сколько денег не хватило
|
||||
CtxTariff string // через запятую список покупаемых тарифов
|
||||
CtxDiscount string // через запятую список применённых скидок
|
||||
|
Loading…
Reference in New Issue
Block a user