generated from PenaSide/GolangTemplate
ci: add envs for trashlog
This commit is contained in:
parent
a470a23f4c
commit
b58da2159b
@ -44,6 +44,8 @@ services:
|
||||
- JWT_AUDIENCE=pena
|
||||
- PUBLIC_KEY=$USER_PKEY
|
||||
- PRIVATE_KEY=$USER_PRIVATEKEY
|
||||
- TRASH_LOG_HOST=10.8.0.15:7113
|
||||
- MODULE_LOGGER=customer-staging
|
||||
ports:
|
||||
- 10.8.0.6:8066:8065
|
||||
- 10.8.0.6:9066:9065
|
||||
|
@ -57,7 +57,7 @@ func (receiver *Controller) OnSuccess(ctx context.Context, in *payment_callback.
|
||||
|
||||
receiver.hLogger.Emit(models.InfoMoneyIncome{
|
||||
CtxUserID: in.Payment.UserID,
|
||||
CtxPrice: uint64(in.Payment.Amount),
|
||||
CtxPrice: int64(in.Payment.Amount),
|
||||
KeyCurrency: in.Payment.Currency,
|
||||
CtxID: in.Payment.PaymentID,
|
||||
KeyPaymentType: in.Payment.Type,
|
||||
|
@ -181,10 +181,10 @@ func (receiver *CartController) Pay(ctx *fiber.Ctx) error {
|
||||
CtxUserID: userID,
|
||||
CtxAccountID: account.ID,
|
||||
KeySuccess: false,
|
||||
CtxPrice: discountResponse.Price - uint64(account.Wallet.Money),
|
||||
CtxPrice: int64(discountResponse.Price - uint64(account.Wallet.Money)),
|
||||
CtxTariff: strings.Join(account.Cart, ","),
|
||||
CtxDiscount: strings.Join(utils.GetAppliedDiscountsIDs(discountResponse.AppliedDiscounts), ","),
|
||||
CtxRowPrice: tariffsAmount,
|
||||
CtxRowPrice: int64(tariffsAmount),
|
||||
CtxRowData: utils.MarshalRawDetails(models.RawDetails{Tariffs: tariffs, Price: int64(discountResponse.Price)}),
|
||||
})
|
||||
return receiver.middleWare.Error(ctx, fiber.StatusPaymentRequired, "insufficient funds: %d", int64(discountResponse.Price)-account.Wallet.Money)
|
||||
@ -306,10 +306,10 @@ func (receiver *CartController) Pay(ctx *fiber.Ctx) error {
|
||||
CtxUserID: userID,
|
||||
CtxAccountID: updatedAccount.ID,
|
||||
KeySuccess: true,
|
||||
CtxPrice: discountResponse.Price,
|
||||
CtxPrice: int64(discountResponse.Price),
|
||||
CtxTariff: strings.Join(account.Cart, ","),
|
||||
CtxDiscount: strings.Join(utils.GetAppliedDiscountsIDs(discountResponse.AppliedDiscounts), ","),
|
||||
CtxRowPrice: tariffsAmount,
|
||||
CtxRowPrice: int64(tariffsAmount),
|
||||
CtxRowData: utils.MarshalRawDetails(models.RawDetails{Tariffs: tariffs, Price: int64(discountResponse.Price)}),
|
||||
})
|
||||
|
||||
|
@ -90,7 +90,7 @@ func (receiver *WalletController) RequestMoney(ctx *fiber.Ctx) error {
|
||||
CtxAccountID: "",
|
||||
KeyPaymentType: string(request.Type),
|
||||
KeyCurrency: request.Currency,
|
||||
CtxPrice: uint64(request.Amount),
|
||||
CtxPrice: int64(request.Amount),
|
||||
CtxReturnURL: link,
|
||||
})
|
||||
|
||||
@ -336,7 +336,7 @@ func (receiver *WalletController) PostWalletRspay(ctx *fiber.Ctx) error {
|
||||
KeyPath: ctx.Path(),
|
||||
CtxUserID: userID,
|
||||
CtxAccountID: user.ID,
|
||||
CtxPrice: uint64(*req.Money),
|
||||
CtxPrice: int64(*req.Money),
|
||||
CtxLogin: authData.Login,
|
||||
})
|
||||
|
||||
|
@ -16,10 +16,10 @@ type AllFields struct {
|
||||
KeyCurrency string
|
||||
CtxTariffID string
|
||||
KeySuccess bool
|
||||
CtxPrice uint64
|
||||
CtxPrice int64
|
||||
CtxTariff string
|
||||
CtxDiscount string
|
||||
CtxRowPrice uint64
|
||||
CtxRowPrice int64
|
||||
CtxRowData string
|
||||
KeyPaymentType string
|
||||
CtxReturnURL string
|
||||
@ -69,10 +69,10 @@ type InfoPayCart struct {
|
||||
CtxUserID string //айдишник юзера из токена
|
||||
CtxAccountID string // айдишник аккаунта
|
||||
KeySuccess bool // получилось оплатить или не хватило денег
|
||||
CtxPrice uint64 // сумма в копейках. если не удалось оплатить - записать сколько денег не хватило
|
||||
CtxPrice int64 // сумма в копейках. если не удалось оплатить - записать сколько денег не хватило
|
||||
CtxTariff string // через запятую список покупаемых тарифов
|
||||
CtxDiscount string // через запятую список применённых скидок
|
||||
CtxRowPrice uint64 // стоимость без скидок
|
||||
CtxRowPrice int64 // стоимость без скидок
|
||||
CtxRowData string // замаршаленные данные, которые обычно складываются в RawDetails
|
||||
}
|
||||
|
||||
@ -85,13 +85,13 @@ type InfoRequestMoney struct {
|
||||
CtxAccountID string // айдишник аккаунта
|
||||
KeyPaymentType string //направление оплаты, через которое оплачиваем
|
||||
KeyCurrency string //значение валюты кошелька. сейчас там фиксированное, но потом пригодится
|
||||
CtxPrice uint64 // сумма в копейках
|
||||
CtxPrice int64 // сумма в копейках
|
||||
CtxReturnURL string // возвращенный от аггрегатора линк на оплату
|
||||
}
|
||||
|
||||
type InfoMoneyIncome struct {
|
||||
CtxUserID string //айдишник юзера из токена
|
||||
CtxPrice uint64 // сумма в копейках
|
||||
CtxPrice int64 // сумма в копейках
|
||||
KeyCurrency string //значение валюты кошелька. сейчас там фиксированное, но потом пригодится
|
||||
CtxID string //айдишник запроса оплаты
|
||||
KeyPaymentType string //направление оплаты, через которое оплачиваем
|
||||
@ -116,6 +116,6 @@ type InfoRSPay struct {
|
||||
KeyPath string
|
||||
CtxUserID string //айдишник юзера из токена
|
||||
CtxAccountID string // айдишник аккаунта
|
||||
CtxPrice uint64 // сумма в копейках
|
||||
CtxPrice int64 // сумма в копейках
|
||||
CtxLogin string // значение логина. мы там получаем его из сервиса авторизации
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user