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