generated from PenaSide/GolangTemplate
fix: удалил ненужные подробности из обращений к treasurer
This commit is contained in:
parent
1aedb13c06
commit
a49ba93b6b
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,4 +3,5 @@ vendor/
|
||||
.idea/
|
||||
.vscode
|
||||
.env
|
||||
main
|
||||
|
||||
|
@ -10,15 +10,10 @@ option go_package = "./treasurer";
|
||||
service TreasurerService {
|
||||
rpc GetPaymentLinkBankCard(GetBankCardPaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkYooMoney(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkQIWI(GetPhonePaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkSberPay(GetPhonePaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkAlfaClick(GetLoginPaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkSberPay(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkTinkoff(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkSberbankB2B(GetB2BPaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkSberbankB2B(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkSBP(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkMobile(GetPhonePaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkCash(GetPhonePaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
||||
rpc GetPaymentLinkInstallments(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
||||
}
|
||||
|
||||
message GetBankCardPaymentLinkRequest {
|
||||
|
@ -11,8 +11,8 @@ services:
|
||||
- HTTP_PORT=8065
|
||||
|
||||
- GRPC_HOST=0.0.0.0
|
||||
- GRPC_PORT=9085
|
||||
- GRPC_DOMEN=http://customer-service:9085
|
||||
- GRPC_PORT=9065
|
||||
- GRPC_DOMEN=10.6.0.11:9065
|
||||
|
||||
- MONGO_HOST=10.6.0.11
|
||||
- MONGO_PORT=27017
|
||||
|
@ -80,28 +80,7 @@ func (receiver *PaymentClient) GetPaymentLinkYooMoney(ctx context.Context, reque
|
||||
return response.RedirectURL, nil
|
||||
}
|
||||
|
||||
func (receiver *PaymentClient) GetPaymentLinkQIWI(ctx context.Context, request *treasurer.GetPhonePaymentLinkRequest) (string, errors.Error) {
|
||||
client, closeConnection, connectErr := receiver.connect(ctx)
|
||||
if connectErr != nil {
|
||||
receiver.logger.Error("failed to connect on <GetPaymentLinkQIWI> of <PaymentClient>", zap.Error(connectErr))
|
||||
return "", errors.New(fmt.Errorf("failed connect to payment service: %w", connectErr), errors.ErrInternalError)
|
||||
}
|
||||
defer closeConnection()
|
||||
|
||||
response, err := client.GetPaymentLinkQIWI(ctx, request)
|
||||
if err != nil {
|
||||
receiver.logger.Error("failed to get payment link on <GetPaymentLinkQIWI> of <PaymentClient>",
|
||||
zap.Error(err),
|
||||
zap.String("host", receiver.paymentServiceHost),
|
||||
)
|
||||
|
||||
return "", errors.New(fmt.Errorf("failed to get payment link: %w", err), errors.ErrInternalError)
|
||||
}
|
||||
|
||||
return response.RedirectURL, nil
|
||||
}
|
||||
|
||||
func (receiver *PaymentClient) GetPaymentLinkSberPay(ctx context.Context, request *treasurer.GetPhonePaymentLinkRequest) (string, errors.Error) {
|
||||
func (receiver *PaymentClient) GetPaymentLinkSberPay(ctx context.Context, request *treasurer.GetPaymentLinkBody) (string, errors.Error) {
|
||||
client, closeConnection, connectErr := receiver.connect(ctx)
|
||||
if connectErr != nil {
|
||||
receiver.logger.Error("failed to connect on <GetPaymentLinkSberPay> of <PaymentClient>", zap.Error(connectErr))
|
||||
@ -122,17 +101,17 @@ func (receiver *PaymentClient) GetPaymentLinkSberPay(ctx context.Context, reques
|
||||
return response.RedirectURL, nil
|
||||
}
|
||||
|
||||
func (receiver *PaymentClient) GetPaymentLinkAlfaClick(ctx context.Context, request *treasurer.GetLoginPaymentLinkRequest) (string, errors.Error) {
|
||||
func (receiver *PaymentClient) GetPaymentLinkSBP(ctx context.Context, request *treasurer.GetPaymentLinkBody) (string, errors.Error) {
|
||||
client, closeConnection, connectErr := receiver.connect(ctx)
|
||||
if connectErr != nil {
|
||||
receiver.logger.Error("failed to connect on <GetPaymentLinkAlfaClick> of <PaymentClient>", zap.Error(connectErr))
|
||||
receiver.logger.Error("failed to connect on <GetPaymentLinkSBP> of <PaymentClient>", zap.Error(connectErr))
|
||||
return "", errors.New(fmt.Errorf("failed connect to payment service: %w", connectErr), errors.ErrInternalError)
|
||||
}
|
||||
defer closeConnection()
|
||||
|
||||
response, err := client.GetPaymentLinkAlfaClick(ctx, request)
|
||||
response, err := client.GetPaymentLinkSBP(ctx, request)
|
||||
if err != nil {
|
||||
receiver.logger.Error("failed to get payment link on <GetPaymentLinkAlfaClick> of <PaymentClient>",
|
||||
receiver.logger.Error("failed to get payment link on <GetPaymentLinkSBP> of <PaymentClient>",
|
||||
zap.Error(err),
|
||||
zap.String("host", receiver.paymentServiceHost),
|
||||
)
|
||||
@ -164,7 +143,7 @@ func (receiver *PaymentClient) GetPaymentLinkTinkoff(ctx context.Context, reques
|
||||
return response.RedirectURL, nil
|
||||
}
|
||||
|
||||
func (receiver *PaymentClient) GetPaymentLinkSberbankB2B(ctx context.Context, request *treasurer.GetB2BPaymentLinkRequest) (string, errors.Error) {
|
||||
func (receiver *PaymentClient) GetPaymentLinkSberbankB2B(ctx context.Context, request *treasurer.GetPaymentLinkBody) (string, errors.Error) {
|
||||
client, closeConnection, connectErr := receiver.connect(ctx)
|
||||
if connectErr != nil {
|
||||
receiver.logger.Error("failed to connect on <GetPaymentLinkSberbankB2B> of <PaymentClient>", zap.Error(connectErr))
|
||||
@ -185,69 +164,6 @@ func (receiver *PaymentClient) GetPaymentLinkSberbankB2B(ctx context.Context, re
|
||||
return response.RedirectURL, nil
|
||||
}
|
||||
|
||||
func (receiver *PaymentClient) GetPaymentLinkMobile(ctx context.Context, request *treasurer.GetPhonePaymentLinkRequest) (string, errors.Error) {
|
||||
client, closeConnection, connectErr := receiver.connect(ctx)
|
||||
if connectErr != nil {
|
||||
receiver.logger.Error("failed to connect on <GetPaymentLinkMobile> of <PaymentClient>", zap.Error(connectErr))
|
||||
return "", errors.New(fmt.Errorf("failed connect to payment service: %w", connectErr), errors.ErrInternalError)
|
||||
}
|
||||
defer closeConnection()
|
||||
|
||||
response, err := client.GetPaymentLinkMobile(ctx, request)
|
||||
if err != nil {
|
||||
receiver.logger.Error("failed to get payment link on <GetPaymentLinkMobile> of <PaymentClient>",
|
||||
zap.Error(err),
|
||||
zap.String("host", receiver.paymentServiceHost),
|
||||
)
|
||||
|
||||
return "", errors.New(fmt.Errorf("failed to get payment link: %w", err), errors.ErrInternalError)
|
||||
}
|
||||
|
||||
return response.RedirectURL, nil
|
||||
}
|
||||
|
||||
func (receiver *PaymentClient) GetPaymentLinkCash(ctx context.Context, request *treasurer.GetPhonePaymentLinkRequest) (string, errors.Error) {
|
||||
client, closeConnection, connectErr := receiver.connect(ctx)
|
||||
if connectErr != nil {
|
||||
receiver.logger.Error("failed to connect on <GetPaymentLinkCash> of <PaymentClient>", zap.Error(connectErr))
|
||||
return "", errors.New(fmt.Errorf("failed connect to payment service: %w", connectErr), errors.ErrInternalError)
|
||||
}
|
||||
defer closeConnection()
|
||||
|
||||
response, err := client.GetPaymentLinkCash(ctx, request)
|
||||
if err != nil {
|
||||
receiver.logger.Error("failed to get payment link on <GetPaymentLinkCash> of <PaymentClient>",
|
||||
zap.Error(err),
|
||||
zap.String("host", receiver.paymentServiceHost),
|
||||
)
|
||||
|
||||
return "", errors.New(fmt.Errorf("failed to get payment link: %w", err), errors.ErrInternalError)
|
||||
}
|
||||
|
||||
return response.RedirectURL, nil
|
||||
}
|
||||
|
||||
func (receiver *PaymentClient) GetPaymentLinkInstallments(ctx context.Context, request *treasurer.GetPaymentLinkBody) (string, errors.Error) {
|
||||
client, closeConnection, connectErr := receiver.connect(ctx)
|
||||
if connectErr != nil {
|
||||
receiver.logger.Error("failed to connect on <GetPaymentLinkInstallments> of <PaymentClient>", zap.Error(connectErr))
|
||||
return "", errors.New(fmt.Errorf("failed connect to payment service: %w", connectErr), errors.ErrInternalError)
|
||||
}
|
||||
defer closeConnection()
|
||||
|
||||
response, err := client.GetPaymentLinkInstallments(ctx, request)
|
||||
if err != nil {
|
||||
receiver.logger.Error("failed to get payment link on <GetPaymentLinkInstallments> of <PaymentClient>",
|
||||
zap.Error(err),
|
||||
zap.String("host", receiver.paymentServiceHost),
|
||||
)
|
||||
|
||||
return "", errors.New(fmt.Errorf("failed to get payment link: %w", err), errors.ErrInternalError)
|
||||
}
|
||||
|
||||
return response.RedirectURL, nil
|
||||
}
|
||||
|
||||
func (receiver *PaymentClient) connect(ctx context.Context) (treasurer.TreasurerServiceClient, func(), errors.Error) {
|
||||
connection, err := grpc.DialContext(ctx, receiver.paymentServiceHost, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
if err != nil {
|
||||
|
@ -42,7 +42,7 @@ func (receiver *Controller) InsertHistory(ctx context.Context, in *customer.Hist
|
||||
UserID: in.UserID,
|
||||
Comment: in.Comment,
|
||||
Key: in.Key,
|
||||
// RawDetails: in.RawDetails,
|
||||
//RawDetails: in.RawDetails,
|
||||
}); err != nil {
|
||||
receiver.logger.Error("failed to insert history on <InsertHistory> of <HistoryController>", zap.Error(err))
|
||||
return nil, errors.GRPC("failed to insert history", err)
|
||||
|
@ -45,6 +45,7 @@ func (receiver *Controller) OnSuccess(ctx context.Context, in *payment_callback.
|
||||
Currency: in.Payment.Currency,
|
||||
Amount: in.Payment.Amount,
|
||||
UserID: in.Payment.UserID,
|
||||
Type: in.Payment.Type,
|
||||
}); err != nil {
|
||||
receiver.logger.Error("failed to send success event on <OnSuccess> of <PaymentController>", zap.Error(err))
|
||||
return nil, errors.GRPC("failed to send success event", err)
|
||||
|
@ -24,18 +24,14 @@ func (api *API2) GetPaymentLink(ctx context.Context, request *models.GetPaymentL
|
||||
return api.GetPaymentLinkBankCard(ctx, request)
|
||||
case models.PaymentTypeYoomoney:
|
||||
return api.GetPaymentLinkYooMoney(ctx, request)
|
||||
case models.PaymentTypeQiwi:
|
||||
return api.GetPaymentLinkQIWI(ctx, request)
|
||||
case models.PaymentTypeSberPay:
|
||||
return api.GetPaymentLinkSberPay(ctx, request)
|
||||
case models.PaymentTypeAlfabank:
|
||||
return api.GetPaymentLinkAlfaClick(ctx, request)
|
||||
case models.PaymentTypeTinkoff:
|
||||
return api.GetPaymentLinkTinkoff(ctx, request)
|
||||
case models.PaymentTypeMobile:
|
||||
return api.GetPaymentLinkMobile(ctx, request)
|
||||
case models.PaymentTypeCash:
|
||||
return api.GetPaymentLinkCash(ctx, request)
|
||||
case models.PaymentTypeSBP:
|
||||
return api.GetPaymentLinkSBP(ctx, request)
|
||||
case models.PaymentTypeSberB2B:
|
||||
return api.GetPaymentLinkB2B(ctx, request)
|
||||
}
|
||||
|
||||
return "", errors.NewWithMessage("invalid payment method type", errors.ErrInvalidArgs)
|
||||
@ -51,11 +47,6 @@ func (api *API2) GetPaymentLinkBankCard(ctx context.Context, request *models.Get
|
||||
CallbackHostGRPC: []string{api.grpc.Domen},
|
||||
ReturnURL: request.Body.ReturnURL,
|
||||
},
|
||||
BankCard: &treasurer.BankCardInformation{
|
||||
Number: request.Body.BankCard.Number,
|
||||
ExpiryYear: request.Body.BankCard.ExpiryYear,
|
||||
ExpiryMonth: request.Body.BankCard.ExpiryMonth,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
api.logger.Error("failed to get bankcard payment link on <GetPaymentLinkBankCard> of <PaymentService>", zap.Error(err))
|
||||
@ -84,28 +75,8 @@ func (api *API2) GetPaymentLinkYooMoney(ctx context.Context, request *models.Get
|
||||
return link, nil
|
||||
}
|
||||
|
||||
func (api *API2) GetPaymentLinkQIWI(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
||||
link, err := api.clients.payment.GetPaymentLinkQIWI(ctx, &treasurer.GetPhonePaymentLinkRequest{
|
||||
MainSettings: &treasurer.MainPaymentSettings{
|
||||
Currency: request.Body.Currency,
|
||||
Amount: request.Body.Amount,
|
||||
UserID: request.UserID,
|
||||
ClientIP: request.ClientIP,
|
||||
CallbackHostGRPC: []string{api.grpc.Domen},
|
||||
ReturnURL: request.Body.ReturnURL,
|
||||
},
|
||||
Phone: request.Body.PhoneNumber,
|
||||
})
|
||||
if err != nil {
|
||||
api.logger.Error("failed to get qiwi payment link on <GetPaymentLinkQIWI> of <PaymentService>", zap.Error(err))
|
||||
return "", err
|
||||
}
|
||||
|
||||
return link, nil
|
||||
}
|
||||
|
||||
func (api *API2) GetPaymentLinkSberPay(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
||||
link, err := api.clients.payment.GetPaymentLinkSberPay(ctx, &treasurer.GetPhonePaymentLinkRequest{
|
||||
link, err := api.clients.payment.GetPaymentLinkSberPay(ctx, &treasurer.GetPaymentLinkBody{
|
||||
MainSettings: &treasurer.MainPaymentSettings{
|
||||
Currency: request.Body.Currency,
|
||||
Amount: request.Body.Amount,
|
||||
@ -114,7 +85,6 @@ func (api *API2) GetPaymentLinkSberPay(ctx context.Context, request *models.GetP
|
||||
CallbackHostGRPC: []string{api.grpc.Domen},
|
||||
ReturnURL: request.Body.ReturnURL,
|
||||
},
|
||||
Phone: request.Body.PhoneNumber,
|
||||
})
|
||||
if err != nil {
|
||||
api.logger.Error("failed to get sberpay payment link on <GetPaymentLinkSberPay> of <PaymentService>", zap.Error(err))
|
||||
@ -124,26 +94,6 @@ func (api *API2) GetPaymentLinkSberPay(ctx context.Context, request *models.GetP
|
||||
return link, nil
|
||||
}
|
||||
|
||||
func (api *API2) GetPaymentLinkAlfaClick(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
||||
link, err := api.clients.payment.GetPaymentLinkAlfaClick(ctx, &treasurer.GetLoginPaymentLinkRequest{
|
||||
MainSettings: &treasurer.MainPaymentSettings{
|
||||
Currency: request.Body.Currency,
|
||||
Amount: request.Body.Amount,
|
||||
UserID: request.UserID,
|
||||
ClientIP: request.ClientIP,
|
||||
CallbackHostGRPC: []string{api.grpc.Domen},
|
||||
ReturnURL: request.Body.ReturnURL,
|
||||
},
|
||||
Login: request.Body.Login,
|
||||
})
|
||||
if err != nil {
|
||||
api.logger.Error("failed to get alfaclick payment link on <GetPaymentLinkAlfaClick> of <PaymentService>", zap.Error(err))
|
||||
return "", err
|
||||
}
|
||||
|
||||
return link, nil
|
||||
}
|
||||
|
||||
func (api *API2) GetPaymentLinkTinkoff(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
||||
link, err := api.clients.payment.GetPaymentLinkTinkoff(ctx, &treasurer.GetPaymentLinkBody{
|
||||
MainSettings: &treasurer.MainPaymentSettings{
|
||||
@ -163,8 +113,8 @@ func (api *API2) GetPaymentLinkTinkoff(ctx context.Context, request *models.GetP
|
||||
return link, nil
|
||||
}
|
||||
|
||||
func (api *API2) GetPaymentLinkMobile(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
||||
link, err := api.clients.payment.GetPaymentLinkMobile(ctx, &treasurer.GetPhonePaymentLinkRequest{
|
||||
func (api *API2) GetPaymentLinkSBP(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
||||
link, err := api.clients.payment.GetPaymentLinkSBP(ctx, &treasurer.GetPaymentLinkBody{
|
||||
MainSettings: &treasurer.MainPaymentSettings{
|
||||
Currency: request.Body.Currency,
|
||||
Amount: request.Body.Amount,
|
||||
@ -173,18 +123,17 @@ func (api *API2) GetPaymentLinkMobile(ctx context.Context, request *models.GetPa
|
||||
CallbackHostGRPC: []string{api.grpc.Domen},
|
||||
ReturnURL: request.Body.ReturnURL,
|
||||
},
|
||||
Phone: request.Body.PhoneNumber,
|
||||
})
|
||||
if err != nil {
|
||||
api.logger.Error("failed to get mobile payment link on <GetPaymentLinkMobile> of <PaymentService>", zap.Error(err))
|
||||
api.logger.Error("failed to get sbp payment link on <GetPaymentLinkSBP> of <PaymentService>", zap.Error(err))
|
||||
return "", err
|
||||
}
|
||||
|
||||
return link, nil
|
||||
}
|
||||
|
||||
func (api *API2) GetPaymentLinkCash(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
||||
link, err := api.clients.payment.GetPaymentLinkCash(ctx, &treasurer.GetPhonePaymentLinkRequest{
|
||||
func (api *API2) GetPaymentLinkB2B(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
||||
link, err := api.clients.payment.GetPaymentLinkSberbankB2B(ctx, &treasurer.GetPaymentLinkBody{
|
||||
MainSettings: &treasurer.MainPaymentSettings{
|
||||
Currency: request.Body.Currency,
|
||||
Amount: request.Body.Amount,
|
||||
@ -193,10 +142,9 @@ func (api *API2) GetPaymentLinkCash(ctx context.Context, request *models.GetPaym
|
||||
CallbackHostGRPC: []string{api.grpc.Domen},
|
||||
ReturnURL: request.Body.ReturnURL,
|
||||
},
|
||||
Phone: request.Body.PhoneNumber,
|
||||
})
|
||||
if err != nil {
|
||||
api.logger.Error("failed to get cash payment link on <GetPaymentLinkCash> of <PaymentService>", zap.Error(err))
|
||||
api.logger.Error("failed to get sberbankb2b payment link on <GetPaymentLinkB2B> of <PaymentService>", zap.Error(err))
|
||||
return "", err
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,7 @@ type ReportHistory struct {
|
||||
type RawDetails struct {
|
||||
Tariffs []Tariff `json:"tariffs" bson:"tariffs"`
|
||||
Price int64 `json:"price" bson:"price"`
|
||||
Comment string `json:"comment" bson:"comment"`
|
||||
}
|
||||
|
||||
func (receiver *History) Sanitize() *History {
|
||||
|
@ -31,17 +31,12 @@ type BankCard struct {
|
||||
type PaymentType string
|
||||
|
||||
const (
|
||||
PaymentTypeBankCard PaymentType = "bankCard"
|
||||
PaymentTypeBankCard PaymentType = "bank_сard"
|
||||
PaymentTypeTinkoff PaymentType = "tinkoffBank"
|
||||
PaymentTypeQiwi PaymentType = "qiwi"
|
||||
PaymentTypeSberPay PaymentType = "sberbank"
|
||||
PaymentTypeYoomoney PaymentType = "yoomoney"
|
||||
PaymentTypeMobile PaymentType = "mobile"
|
||||
PaymentTypeInstallments PaymentType = "installments"
|
||||
PaymentTypeCash PaymentType = "cash"
|
||||
PaymentTypeSBP PaymentType = "sbp"
|
||||
PaymentTypeSberB2B PaymentType = "b2bSberbank"
|
||||
PaymentTypeAlfabank PaymentType = "alfabank"
|
||||
)
|
||||
|
||||
type PaymentEvent struct {
|
||||
@ -50,5 +45,6 @@ type PaymentEvent struct {
|
||||
PaymentID string
|
||||
UserID string
|
||||
Currency string
|
||||
Type string
|
||||
Amount int64
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ var file_treasurer_service_proto_rawDesc = []byte{
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x52, 0x4c,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74,
|
||||
0x55, 0x52, 0x4c, 0x32, 0xcc, 0x08, 0x0a, 0x10, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65,
|
||||
0x55, 0x52, 0x4c, 0x32, 0xcd, 0x04, 0x0a, 0x10, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65,
|
||||
0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x42, 0x61, 0x6e, 0x6b, 0x43, 0x61,
|
||||
0x72, 0x64, 0x12, 0x28, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47,
|
||||
@ -412,63 +412,31 @@ var file_treasurer_service_proto_rawDesc = []byte{
|
||||
0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x65,
|
||||
0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x60, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e,
|
||||
0x6b, 0x51, 0x49, 0x57, 0x49, 0x12, 0x25, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65,
|
||||
0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74,
|
||||
0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x12, 0x63, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c,
|
||||
0x69, 0x6e, 0x6b, 0x53, 0x62, 0x65, 0x72, 0x50, 0x61, 0x79, 0x12, 0x25, 0x2e, 0x74, 0x72, 0x65,
|
||||
0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x50,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x6c, 0x66, 0x61, 0x43, 0x6c, 0x69, 0x63,
|
||||
0x6b, 0x12, 0x25, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e,
|
||||
0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73,
|
||||
0x5b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e,
|
||||
0x6b, 0x53, 0x62, 0x65, 0x72, 0x50, 0x61, 0x79, 0x12, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73,
|
||||
0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c,
|
||||
0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a,
|
||||
0x15, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x54,
|
||||
0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x12, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72,
|
||||
0x69, 0x6e, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75,
|
||||
0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69,
|
||||
0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x15,
|
||||
0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x54, 0x69,
|
||||
0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x12, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65,
|
||||
0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b,
|
||||
0x42, 0x6f, 0x64, 0x79, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x19, 0x47, 0x65, 0x74,
|
||||
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x62, 0x65, 0x72, 0x62,
|
||||
0x61, 0x6e, 0x6b, 0x42, 0x32, 0x42, 0x12, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72,
|
||||
0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e,
|
||||
0x6b, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65,
|
||||
0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x19, 0x47, 0x65,
|
||||
0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x62, 0x65, 0x72,
|
||||
0x62, 0x61, 0x6e, 0x6b, 0x42, 0x32, 0x42, 0x12, 0x23, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75,
|
||||
0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x32, 0x42, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74,
|
||||
0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x12, 0x57, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c,
|
||||
0x69, 0x6e, 0x6b, 0x53, 0x42, 0x50, 0x12, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72,
|
||||
0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e,
|
||||
0x6b, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65,
|
||||
0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x14, 0x47, 0x65,
|
||||
0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x6f, 0x62, 0x69,
|
||||
0x6c, 0x65, 0x12, 0x25, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69,
|
||||
0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x65, 0x61,
|
||||
0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60,
|
||||
0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b,
|
||||
0x43, 0x61, 0x73, 0x68, 0x12, 0x25, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x72,
|
||||
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x60, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69,
|
||||
0x6e, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1d,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x11, 0x47, 0x65,
|
||||
0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x42, 0x50, 0x12,
|
||||
0x1d, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x21,
|
||||
0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61,
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x21, 0x2e,
|
||||
0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x00, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65,
|
||||
0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x00, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72,
|
||||
0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -505,28 +473,18 @@ var file_treasurer_service_proto_depIdxs = []int32{
|
||||
8, // 6: treasurer.GetB2BPaymentLinkRequest.VatData:type_name -> google.protobuf.Empty
|
||||
0, // 7: treasurer.TreasurerService.GetPaymentLinkBankCard:input_type -> treasurer.GetBankCardPaymentLinkRequest
|
||||
1, // 8: treasurer.TreasurerService.GetPaymentLinkYooMoney:input_type -> treasurer.GetPaymentLinkBody
|
||||
2, // 9: treasurer.TreasurerService.GetPaymentLinkQIWI:input_type -> treasurer.GetPhonePaymentLinkRequest
|
||||
2, // 10: treasurer.TreasurerService.GetPaymentLinkSberPay:input_type -> treasurer.GetPhonePaymentLinkRequest
|
||||
3, // 11: treasurer.TreasurerService.GetPaymentLinkAlfaClick:input_type -> treasurer.GetLoginPaymentLinkRequest
|
||||
1, // 12: treasurer.TreasurerService.GetPaymentLinkTinkoff:input_type -> treasurer.GetPaymentLinkBody
|
||||
4, // 13: treasurer.TreasurerService.GetPaymentLinkSberbankB2B:input_type -> treasurer.GetB2BPaymentLinkRequest
|
||||
1, // 14: treasurer.TreasurerService.GetPaymentLinkSBP:input_type -> treasurer.GetPaymentLinkBody
|
||||
2, // 15: treasurer.TreasurerService.GetPaymentLinkMobile:input_type -> treasurer.GetPhonePaymentLinkRequest
|
||||
2, // 16: treasurer.TreasurerService.GetPaymentLinkCash:input_type -> treasurer.GetPhonePaymentLinkRequest
|
||||
1, // 17: treasurer.TreasurerService.GetPaymentLinkInstallments:input_type -> treasurer.GetPaymentLinkBody
|
||||
5, // 18: treasurer.TreasurerService.GetPaymentLinkBankCard:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 19: treasurer.TreasurerService.GetPaymentLinkYooMoney:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 20: treasurer.TreasurerService.GetPaymentLinkQIWI:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 21: treasurer.TreasurerService.GetPaymentLinkSberPay:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 22: treasurer.TreasurerService.GetPaymentLinkAlfaClick:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 23: treasurer.TreasurerService.GetPaymentLinkTinkoff:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 24: treasurer.TreasurerService.GetPaymentLinkSberbankB2B:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 25: treasurer.TreasurerService.GetPaymentLinkSBP:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 26: treasurer.TreasurerService.GetPaymentLinkMobile:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 27: treasurer.TreasurerService.GetPaymentLinkCash:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 28: treasurer.TreasurerService.GetPaymentLinkInstallments:output_type -> treasurer.GetPaymentLinkResponse
|
||||
18, // [18:29] is the sub-list for method output_type
|
||||
7, // [7:18] is the sub-list for method input_type
|
||||
1, // 9: treasurer.TreasurerService.GetPaymentLinkSberPay:input_type -> treasurer.GetPaymentLinkBody
|
||||
1, // 10: treasurer.TreasurerService.GetPaymentLinkTinkoff:input_type -> treasurer.GetPaymentLinkBody
|
||||
1, // 11: treasurer.TreasurerService.GetPaymentLinkSberbankB2B:input_type -> treasurer.GetPaymentLinkBody
|
||||
1, // 12: treasurer.TreasurerService.GetPaymentLinkSBP:input_type -> treasurer.GetPaymentLinkBody
|
||||
5, // 13: treasurer.TreasurerService.GetPaymentLinkBankCard:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 14: treasurer.TreasurerService.GetPaymentLinkYooMoney:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 15: treasurer.TreasurerService.GetPaymentLinkSberPay:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 16: treasurer.TreasurerService.GetPaymentLinkTinkoff:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 17: treasurer.TreasurerService.GetPaymentLinkSberbankB2B:output_type -> treasurer.GetPaymentLinkResponse
|
||||
5, // 18: treasurer.TreasurerService.GetPaymentLinkSBP:output_type -> treasurer.GetPaymentLinkResponse
|
||||
13, // [13:19] is the sub-list for method output_type
|
||||
7, // [7:13] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
|
@ -24,15 +24,10 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
type TreasurerServiceClient interface {
|
||||
GetPaymentLinkBankCard(ctx context.Context, in *GetBankCardPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkYooMoney(ctx context.Context, in *GetPaymentLinkBody, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkQIWI(ctx context.Context, in *GetPhonePaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkSberPay(ctx context.Context, in *GetPhonePaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkAlfaClick(ctx context.Context, in *GetLoginPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkSberPay(ctx context.Context, in *GetPaymentLinkBody, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkTinkoff(ctx context.Context, in *GetPaymentLinkBody, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkSberbankB2B(ctx context.Context, in *GetB2BPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkSberbankB2B(ctx context.Context, in *GetPaymentLinkBody, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkSBP(ctx context.Context, in *GetPaymentLinkBody, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkMobile(ctx context.Context, in *GetPhonePaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkCash(ctx context.Context, in *GetPhonePaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkInstallments(ctx context.Context, in *GetPaymentLinkBody, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||
}
|
||||
|
||||
type treasurerServiceClient struct {
|
||||
@ -61,16 +56,7 @@ func (c *treasurerServiceClient) GetPaymentLinkYooMoney(ctx context.Context, in
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *treasurerServiceClient) GetPaymentLinkQIWI(ctx context.Context, in *GetPhonePaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
|
||||
out := new(GetPaymentLinkResponse)
|
||||
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkQIWI", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *treasurerServiceClient) GetPaymentLinkSberPay(ctx context.Context, in *GetPhonePaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
|
||||
func (c *treasurerServiceClient) GetPaymentLinkSberPay(ctx context.Context, in *GetPaymentLinkBody, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
|
||||
out := new(GetPaymentLinkResponse)
|
||||
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkSberPay", in, out, opts...)
|
||||
if err != nil {
|
||||
@ -79,15 +65,6 @@ func (c *treasurerServiceClient) GetPaymentLinkSberPay(ctx context.Context, in *
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *treasurerServiceClient) GetPaymentLinkAlfaClick(ctx context.Context, in *GetLoginPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
|
||||
out := new(GetPaymentLinkResponse)
|
||||
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkAlfaClick", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *treasurerServiceClient) GetPaymentLinkTinkoff(ctx context.Context, in *GetPaymentLinkBody, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
|
||||
out := new(GetPaymentLinkResponse)
|
||||
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkTinkoff", in, out, opts...)
|
||||
@ -97,7 +74,7 @@ func (c *treasurerServiceClient) GetPaymentLinkTinkoff(ctx context.Context, in *
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *treasurerServiceClient) GetPaymentLinkSberbankB2B(ctx context.Context, in *GetB2BPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
|
||||
func (c *treasurerServiceClient) GetPaymentLinkSberbankB2B(ctx context.Context, in *GetPaymentLinkBody, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
|
||||
out := new(GetPaymentLinkResponse)
|
||||
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkSberbankB2B", in, out, opts...)
|
||||
if err != nil {
|
||||
@ -115,48 +92,16 @@ func (c *treasurerServiceClient) GetPaymentLinkSBP(ctx context.Context, in *GetP
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *treasurerServiceClient) GetPaymentLinkMobile(ctx context.Context, in *GetPhonePaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
|
||||
out := new(GetPaymentLinkResponse)
|
||||
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkMobile", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *treasurerServiceClient) GetPaymentLinkCash(ctx context.Context, in *GetPhonePaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
|
||||
out := new(GetPaymentLinkResponse)
|
||||
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkCash", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *treasurerServiceClient) GetPaymentLinkInstallments(ctx context.Context, in *GetPaymentLinkBody, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
|
||||
out := new(GetPaymentLinkResponse)
|
||||
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkInstallments", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// TreasurerServiceServer is the server API for TreasurerService service.
|
||||
// All implementations should embed UnimplementedTreasurerServiceServer
|
||||
// for forward compatibility
|
||||
type TreasurerServiceServer interface {
|
||||
GetPaymentLinkBankCard(context.Context, *GetBankCardPaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkYooMoney(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkQIWI(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkSberPay(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkAlfaClick(context.Context, *GetLoginPaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkSberPay(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkTinkoff(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkSberbankB2B(context.Context, *GetB2BPaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkSberbankB2B(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkSBP(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkMobile(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkCash(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
||||
GetPaymentLinkInstallments(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedTreasurerServiceServer should be embedded to have forward compatible implementations.
|
||||
@ -169,33 +114,18 @@ func (UnimplementedTreasurerServiceServer) GetPaymentLinkBankCard(context.Contex
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkYooMoney(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkYooMoney not implemented")
|
||||
}
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkQIWI(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkQIWI not implemented")
|
||||
}
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkSberPay(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error) {
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkSberPay(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkSberPay not implemented")
|
||||
}
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkAlfaClick(context.Context, *GetLoginPaymentLinkRequest) (*GetPaymentLinkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkAlfaClick not implemented")
|
||||
}
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkTinkoff(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkTinkoff not implemented")
|
||||
}
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkSberbankB2B(context.Context, *GetB2BPaymentLinkRequest) (*GetPaymentLinkResponse, error) {
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkSberbankB2B(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkSberbankB2B not implemented")
|
||||
}
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkSBP(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkSBP not implemented")
|
||||
}
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkMobile(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkMobile not implemented")
|
||||
}
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkCash(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkCash not implemented")
|
||||
}
|
||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkInstallments(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkInstallments not implemented")
|
||||
}
|
||||
|
||||
// UnsafeTreasurerServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to TreasurerServiceServer will
|
||||
@ -244,26 +174,8 @@ func _TreasurerService_GetPaymentLinkYooMoney_Handler(srv interface{}, ctx conte
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TreasurerService_GetPaymentLinkQIWI_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPhonePaymentLinkRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkQIWI(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/treasurer.TreasurerService/GetPaymentLinkQIWI",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkQIWI(ctx, req.(*GetPhonePaymentLinkRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TreasurerService_GetPaymentLinkSberPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPhonePaymentLinkRequest)
|
||||
in := new(GetPaymentLinkBody)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -275,25 +187,7 @@ func _TreasurerService_GetPaymentLinkSberPay_Handler(srv interface{}, ctx contex
|
||||
FullMethod: "/treasurer.TreasurerService/GetPaymentLinkSberPay",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkSberPay(ctx, req.(*GetPhonePaymentLinkRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TreasurerService_GetPaymentLinkAlfaClick_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetLoginPaymentLinkRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkAlfaClick(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/treasurer.TreasurerService/GetPaymentLinkAlfaClick",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkAlfaClick(ctx, req.(*GetLoginPaymentLinkRequest))
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkSberPay(ctx, req.(*GetPaymentLinkBody))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@ -317,7 +211,7 @@ func _TreasurerService_GetPaymentLinkTinkoff_Handler(srv interface{}, ctx contex
|
||||
}
|
||||
|
||||
func _TreasurerService_GetPaymentLinkSberbankB2B_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetB2BPaymentLinkRequest)
|
||||
in := new(GetPaymentLinkBody)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -329,7 +223,7 @@ func _TreasurerService_GetPaymentLinkSberbankB2B_Handler(srv interface{}, ctx co
|
||||
FullMethod: "/treasurer.TreasurerService/GetPaymentLinkSberbankB2B",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkSberbankB2B(ctx, req.(*GetB2BPaymentLinkRequest))
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkSberbankB2B(ctx, req.(*GetPaymentLinkBody))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@ -352,60 +246,6 @@ func _TreasurerService_GetPaymentLinkSBP_Handler(srv interface{}, ctx context.Co
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TreasurerService_GetPaymentLinkMobile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPhonePaymentLinkRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkMobile(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/treasurer.TreasurerService/GetPaymentLinkMobile",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkMobile(ctx, req.(*GetPhonePaymentLinkRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TreasurerService_GetPaymentLinkCash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPhonePaymentLinkRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkCash(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/treasurer.TreasurerService/GetPaymentLinkCash",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkCash(ctx, req.(*GetPhonePaymentLinkRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _TreasurerService_GetPaymentLinkInstallments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPaymentLinkBody)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkInstallments(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/treasurer.TreasurerService/GetPaymentLinkInstallments",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TreasurerServiceServer).GetPaymentLinkInstallments(ctx, req.(*GetPaymentLinkBody))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// TreasurerService_ServiceDesc is the grpc.ServiceDesc for TreasurerService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@ -421,18 +261,10 @@ var TreasurerService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GetPaymentLinkYooMoney",
|
||||
Handler: _TreasurerService_GetPaymentLinkYooMoney_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPaymentLinkQIWI",
|
||||
Handler: _TreasurerService_GetPaymentLinkQIWI_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPaymentLinkSberPay",
|
||||
Handler: _TreasurerService_GetPaymentLinkSberPay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPaymentLinkAlfaClick",
|
||||
Handler: _TreasurerService_GetPaymentLinkAlfaClick_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPaymentLinkTinkoff",
|
||||
Handler: _TreasurerService_GetPaymentLinkTinkoff_Handler,
|
||||
@ -445,18 +277,6 @@ var TreasurerService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GetPaymentLinkSBP",
|
||||
Handler: _TreasurerService_GetPaymentLinkSBP_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPaymentLinkMobile",
|
||||
Handler: _TreasurerService_GetPaymentLinkMobile_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPaymentLinkCash",
|
||||
Handler: _TreasurerService_GetPaymentLinkCash_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPaymentLinkInstallments",
|
||||
Handler: _TreasurerService_GetPaymentLinkInstallments_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "treasurer/service.proto",
|
||||
|
@ -82,16 +82,20 @@ func (receiver *PaymentCallbackService) SuccessEvent(ctx context.Context, event
|
||||
return err
|
||||
}
|
||||
|
||||
go func() {
|
||||
//go func() {
|
||||
if _, err := receiver.historyService.CreateHistory(ctx, &models.History{
|
||||
UserID: account.UserID,
|
||||
Comment: event.Message,
|
||||
Key: event.Key,
|
||||
// RawDetails: fmt.Sprintf("%d%s", event.Amount, event.Currency),
|
||||
RawDetails: models.RawDetails{
|
||||
Price: event.Amount,
|
||||
Comment: event.Type + ":" + event.Currency,
|
||||
},
|
||||
}); err != nil {
|
||||
receiver.logger.Error("failed to create history on <SuccessEvent> of <PaymentCallbackService>", zap.Error(err))
|
||||
return err
|
||||
}
|
||||
}()
|
||||
//}()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -131,17 +131,17 @@ func (receiver *Service) ReplenishAccountWallet(ctx context.Context, request *mo
|
||||
return nil, changeErr
|
||||
}
|
||||
|
||||
go func() {
|
||||
if _, historyErr := receiver.historyService.CreateHistory(ctx, &models.History{
|
||||
Key: models.CustomerHistoryKeyReplenish,
|
||||
UserID: request.Account.UserID,
|
||||
Comment: "Успешное пополнение средств (Без конвертации валюты)",
|
||||
// RawDetails: fmt.Sprintf("%d%s", cash, models.InternalCurrencyKey),
|
||||
}); historyErr != nil {
|
||||
receiver.logger.Error("failed to insert history on <ReplenishAccountWallet> of <WalletService>", zap.Error(historyErr))
|
||||
}
|
||||
}()
|
||||
|
||||
// go func() {
|
||||
// if _, historyErr := receiver.historyService.CreateHistory(ctx, &models.History{
|
||||
// Key: models.CustomerHistoryKeyReplenish,
|
||||
// UserID: request.Account.UserID,
|
||||
// Comment: "Успешное пополнение средств (Без конвертации валюты)",
|
||||
// // RawDetails: fmt.Sprintf("%d%s", cash, models.InternalCurrencyKey),
|
||||
// }); historyErr != nil {
|
||||
// receiver.logger.Error("failed to insert history on <ReplenishAccountWallet> of <WalletService>", zap.Error(historyErr))
|
||||
// }
|
||||
// }()
|
||||
//
|
||||
return updatedAccount, nil
|
||||
}
|
||||
|
||||
@ -175,16 +175,16 @@ func (receiver *Service) ReplenishAccountWallet(ctx context.Context, request *mo
|
||||
return nil, err
|
||||
}
|
||||
|
||||
go func() {
|
||||
if _, historyErr := receiver.historyService.CreateHistory(ctx, &models.History{
|
||||
Key: models.CustomerHistoryKeyReplenish,
|
||||
UserID: request.Account.UserID,
|
||||
Comment: "Успешное пополнение средств (C конвертацией валюты)",
|
||||
//RawDetails: fmt.Sprintf("%d%s", cash, request.Currency),
|
||||
}); historyErr != nil {
|
||||
receiver.logger.Error("failed to insert history on <ReplenishAccountWallet> of <WalletService>", zap.Error(historyErr))
|
||||
}
|
||||
}()
|
||||
// go func() {
|
||||
// if _, historyErr := receiver.historyService.CreateHistory(ctx, &models.History{
|
||||
// Key: models.CustomerHistoryKeyReplenish,
|
||||
// UserID: request.Account.UserID,
|
||||
// Comment: "Успешное пополнение средств (C конвертацией валюты)",
|
||||
// //RawDetails: fmt.Sprintf("%d%s", cash, request.Currency),
|
||||
// }); historyErr != nil {
|
||||
// receiver.logger.Error("failed to insert history on <ReplenishAccountWallet> of <WalletService>", zap.Error(historyErr))
|
||||
// }
|
||||
// }()
|
||||
|
||||
return updatedAccount, nil
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package utils
|
||||
import (
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/errors"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/customer/pkg/validate"
|
||||
)
|
||||
|
||||
func ValidateGetPaymentLinkBody(request *models.GetPaymentLinkBody) errors.Error {
|
||||
@ -11,52 +10,5 @@ func ValidateGetPaymentLinkBody(request *models.GetPaymentLinkBody) errors.Error
|
||||
return errors.NewWithMessage("request body is empty", errors.ErrInvalidArgs)
|
||||
}
|
||||
|
||||
switch request.Type {
|
||||
case models.PaymentTypeInstallments, models.PaymentTypeSBP, models.PaymentTypeTinkoff, models.PaymentTypeYoomoney:
|
||||
return nil
|
||||
case models.PaymentTypeQiwi, models.PaymentTypeSberPay, models.PaymentTypeMobile, models.PaymentTypeCash:
|
||||
return validateMobilePayment(request)
|
||||
case models.PaymentTypeAlfabank:
|
||||
return validateLoginPayment(request)
|
||||
case models.PaymentTypeBankCard:
|
||||
return validateBankcardPayment(request)
|
||||
default:
|
||||
return errors.NewWithMessage("unknown payment type", errors.ErrInvalidArgs)
|
||||
}
|
||||
}
|
||||
|
||||
func validateMobilePayment(request *models.GetPaymentLinkBody) errors.Error {
|
||||
if validate.IsStringEmpty(request.PhoneNumber) {
|
||||
return errors.NewWithMessage("phone number is empty", errors.ErrInvalidArgs)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateLoginPayment(request *models.GetPaymentLinkBody) errors.Error {
|
||||
if validate.IsStringEmpty(request.Login) {
|
||||
return errors.NewWithMessage("login is empty", errors.ErrInvalidArgs)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateBankcardPayment(request *models.GetPaymentLinkBody) errors.Error {
|
||||
if request.BankCard == nil {
|
||||
return errors.NewWithMessage("bank card is empty", errors.ErrInvalidArgs)
|
||||
}
|
||||
|
||||
if validate.IsStringEmpty(request.BankCard.Number) {
|
||||
return errors.NewWithMessage("bankcard number is empty", errors.ErrInvalidArgs)
|
||||
}
|
||||
|
||||
if validate.IsStringEmpty(request.BankCard.ExpiryYear) {
|
||||
return errors.NewWithMessage("bankcard expiry year is empty", errors.ErrInvalidArgs)
|
||||
}
|
||||
|
||||
if validate.IsStringEmpty(request.BankCard.ExpiryMonth) {
|
||||
return errors.NewWithMessage("bankcard expiry month is empty", errors.ErrInvalidArgs)
|
||||
}
|
||||
|
||||
return nil
|
||||
return nil
|
||||
}
|
||||
|
BIN
main
BIN
main
Binary file not shown.
Loading…
Reference in New Issue
Block a user