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/
|
.idea/
|
||||||
.vscode
|
.vscode
|
||||||
.env
|
.env
|
||||||
|
main
|
||||||
|
|
||||||
|
|||||||
@ -10,15 +10,10 @@ option go_package = "./treasurer";
|
|||||||
service TreasurerService {
|
service TreasurerService {
|
||||||
rpc GetPaymentLinkBankCard(GetBankCardPaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
rpc GetPaymentLinkBankCard(GetBankCardPaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
||||||
rpc GetPaymentLinkYooMoney(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
rpc GetPaymentLinkYooMoney(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
||||||
rpc GetPaymentLinkQIWI(GetPhonePaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
rpc GetPaymentLinkSberPay(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
||||||
rpc GetPaymentLinkSberPay(GetPhonePaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
|
||||||
rpc GetPaymentLinkAlfaClick(GetLoginPaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
|
||||||
rpc GetPaymentLinkTinkoff(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
rpc GetPaymentLinkTinkoff(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
||||||
rpc GetPaymentLinkSberbankB2B(GetB2BPaymentLinkRequest) returns (GetPaymentLinkResponse) {}
|
rpc GetPaymentLinkSberbankB2B(GetPaymentLinkBody) returns (GetPaymentLinkResponse) {}
|
||||||
rpc GetPaymentLinkSBP(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 {
|
message GetBankCardPaymentLinkRequest {
|
||||||
|
|||||||
@ -11,8 +11,8 @@ services:
|
|||||||
- HTTP_PORT=8065
|
- HTTP_PORT=8065
|
||||||
|
|
||||||
- GRPC_HOST=0.0.0.0
|
- GRPC_HOST=0.0.0.0
|
||||||
- GRPC_PORT=9085
|
- GRPC_PORT=9065
|
||||||
- GRPC_DOMEN=http://customer-service:9085
|
- GRPC_DOMEN=10.6.0.11:9065
|
||||||
|
|
||||||
- MONGO_HOST=10.6.0.11
|
- MONGO_HOST=10.6.0.11
|
||||||
- MONGO_PORT=27017
|
- MONGO_PORT=27017
|
||||||
|
|||||||
@ -80,28 +80,7 @@ func (receiver *PaymentClient) GetPaymentLinkYooMoney(ctx context.Context, reque
|
|||||||
return response.RedirectURL, nil
|
return response.RedirectURL, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (receiver *PaymentClient) GetPaymentLinkQIWI(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 <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) {
|
|
||||||
client, closeConnection, connectErr := receiver.connect(ctx)
|
client, closeConnection, connectErr := receiver.connect(ctx)
|
||||||
if connectErr != nil {
|
if connectErr != nil {
|
||||||
receiver.logger.Error("failed to connect on <GetPaymentLinkSberPay> of <PaymentClient>", zap.Error(connectErr))
|
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
|
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)
|
client, closeConnection, connectErr := receiver.connect(ctx)
|
||||||
if connectErr != nil {
|
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)
|
return "", errors.New(fmt.Errorf("failed connect to payment service: %w", connectErr), errors.ErrInternalError)
|
||||||
}
|
}
|
||||||
defer closeConnection()
|
defer closeConnection()
|
||||||
|
|
||||||
response, err := client.GetPaymentLinkAlfaClick(ctx, request)
|
response, err := client.GetPaymentLinkSBP(ctx, request)
|
||||||
if err != nil {
|
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.Error(err),
|
||||||
zap.String("host", receiver.paymentServiceHost),
|
zap.String("host", receiver.paymentServiceHost),
|
||||||
)
|
)
|
||||||
@ -164,7 +143,7 @@ func (receiver *PaymentClient) GetPaymentLinkTinkoff(ctx context.Context, reques
|
|||||||
return response.RedirectURL, nil
|
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)
|
client, closeConnection, connectErr := receiver.connect(ctx)
|
||||||
if connectErr != nil {
|
if connectErr != nil {
|
||||||
receiver.logger.Error("failed to connect on <GetPaymentLinkSberbankB2B> of <PaymentClient>", zap.Error(connectErr))
|
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
|
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) {
|
func (receiver *PaymentClient) connect(ctx context.Context) (treasurer.TreasurerServiceClient, func(), errors.Error) {
|
||||||
connection, err := grpc.DialContext(ctx, receiver.paymentServiceHost, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
connection, err := grpc.DialContext(ctx, receiver.paymentServiceHost, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@ -42,7 +42,7 @@ func (receiver *Controller) InsertHistory(ctx context.Context, in *customer.Hist
|
|||||||
UserID: in.UserID,
|
UserID: in.UserID,
|
||||||
Comment: in.Comment,
|
Comment: in.Comment,
|
||||||
Key: in.Key,
|
Key: in.Key,
|
||||||
// RawDetails: in.RawDetails,
|
//RawDetails: in.RawDetails,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
receiver.logger.Error("failed to insert history on <InsertHistory> of <HistoryController>", zap.Error(err))
|
receiver.logger.Error("failed to insert history on <InsertHistory> of <HistoryController>", zap.Error(err))
|
||||||
return nil, errors.GRPC("failed to insert history", 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,
|
Currency: in.Payment.Currency,
|
||||||
Amount: in.Payment.Amount,
|
Amount: in.Payment.Amount,
|
||||||
UserID: in.Payment.UserID,
|
UserID: in.Payment.UserID,
|
||||||
|
Type: in.Payment.Type,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
receiver.logger.Error("failed to send success event on <OnSuccess> of <PaymentController>", zap.Error(err))
|
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)
|
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)
|
return api.GetPaymentLinkBankCard(ctx, request)
|
||||||
case models.PaymentTypeYoomoney:
|
case models.PaymentTypeYoomoney:
|
||||||
return api.GetPaymentLinkYooMoney(ctx, request)
|
return api.GetPaymentLinkYooMoney(ctx, request)
|
||||||
case models.PaymentTypeQiwi:
|
|
||||||
return api.GetPaymentLinkQIWI(ctx, request)
|
|
||||||
case models.PaymentTypeSberPay:
|
case models.PaymentTypeSberPay:
|
||||||
return api.GetPaymentLinkSberPay(ctx, request)
|
return api.GetPaymentLinkSberPay(ctx, request)
|
||||||
case models.PaymentTypeAlfabank:
|
|
||||||
return api.GetPaymentLinkAlfaClick(ctx, request)
|
|
||||||
case models.PaymentTypeTinkoff:
|
case models.PaymentTypeTinkoff:
|
||||||
return api.GetPaymentLinkTinkoff(ctx, request)
|
return api.GetPaymentLinkTinkoff(ctx, request)
|
||||||
case models.PaymentTypeMobile:
|
case models.PaymentTypeSBP:
|
||||||
return api.GetPaymentLinkMobile(ctx, request)
|
return api.GetPaymentLinkSBP(ctx, request)
|
||||||
case models.PaymentTypeCash:
|
case models.PaymentTypeSberB2B:
|
||||||
return api.GetPaymentLinkCash(ctx, request)
|
return api.GetPaymentLinkB2B(ctx, request)
|
||||||
}
|
}
|
||||||
|
|
||||||
return "", errors.NewWithMessage("invalid payment method type", errors.ErrInvalidArgs)
|
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},
|
CallbackHostGRPC: []string{api.grpc.Domen},
|
||||||
ReturnURL: request.Body.ReturnURL,
|
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 {
|
if err != nil {
|
||||||
api.logger.Error("failed to get bankcard payment link on <GetPaymentLinkBankCard> of <PaymentService>", zap.Error(err))
|
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
|
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) {
|
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{
|
MainSettings: &treasurer.MainPaymentSettings{
|
||||||
Currency: request.Body.Currency,
|
Currency: request.Body.Currency,
|
||||||
Amount: request.Body.Amount,
|
Amount: request.Body.Amount,
|
||||||
@ -114,7 +85,6 @@ func (api *API2) GetPaymentLinkSberPay(ctx context.Context, request *models.GetP
|
|||||||
CallbackHostGRPC: []string{api.grpc.Domen},
|
CallbackHostGRPC: []string{api.grpc.Domen},
|
||||||
ReturnURL: request.Body.ReturnURL,
|
ReturnURL: request.Body.ReturnURL,
|
||||||
},
|
},
|
||||||
Phone: request.Body.PhoneNumber,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
api.logger.Error("failed to get sberpay payment link on <GetPaymentLinkSberPay> of <PaymentService>", zap.Error(err))
|
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
|
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) {
|
func (api *API2) GetPaymentLinkTinkoff(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
||||||
link, err := api.clients.payment.GetPaymentLinkTinkoff(ctx, &treasurer.GetPaymentLinkBody{
|
link, err := api.clients.payment.GetPaymentLinkTinkoff(ctx, &treasurer.GetPaymentLinkBody{
|
||||||
MainSettings: &treasurer.MainPaymentSettings{
|
MainSettings: &treasurer.MainPaymentSettings{
|
||||||
@ -163,8 +113,8 @@ func (api *API2) GetPaymentLinkTinkoff(ctx context.Context, request *models.GetP
|
|||||||
return link, nil
|
return link, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (api *API2) GetPaymentLinkMobile(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
func (api *API2) GetPaymentLinkSBP(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
||||||
link, err := api.clients.payment.GetPaymentLinkMobile(ctx, &treasurer.GetPhonePaymentLinkRequest{
|
link, err := api.clients.payment.GetPaymentLinkSBP(ctx, &treasurer.GetPaymentLinkBody{
|
||||||
MainSettings: &treasurer.MainPaymentSettings{
|
MainSettings: &treasurer.MainPaymentSettings{
|
||||||
Currency: request.Body.Currency,
|
Currency: request.Body.Currency,
|
||||||
Amount: request.Body.Amount,
|
Amount: request.Body.Amount,
|
||||||
@ -173,18 +123,17 @@ func (api *API2) GetPaymentLinkMobile(ctx context.Context, request *models.GetPa
|
|||||||
CallbackHostGRPC: []string{api.grpc.Domen},
|
CallbackHostGRPC: []string{api.grpc.Domen},
|
||||||
ReturnURL: request.Body.ReturnURL,
|
ReturnURL: request.Body.ReturnURL,
|
||||||
},
|
},
|
||||||
Phone: request.Body.PhoneNumber,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
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 "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
return link, nil
|
return link, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (api *API2) GetPaymentLinkCash(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
func (api *API2) GetPaymentLinkB2B(ctx context.Context, request *models.GetPaymentLinkRequest) (string, errors.Error) {
|
||||||
link, err := api.clients.payment.GetPaymentLinkCash(ctx, &treasurer.GetPhonePaymentLinkRequest{
|
link, err := api.clients.payment.GetPaymentLinkSberbankB2B(ctx, &treasurer.GetPaymentLinkBody{
|
||||||
MainSettings: &treasurer.MainPaymentSettings{
|
MainSettings: &treasurer.MainPaymentSettings{
|
||||||
Currency: request.Body.Currency,
|
Currency: request.Body.Currency,
|
||||||
Amount: request.Body.Amount,
|
Amount: request.Body.Amount,
|
||||||
@ -193,10 +142,9 @@ func (api *API2) GetPaymentLinkCash(ctx context.Context, request *models.GetPaym
|
|||||||
CallbackHostGRPC: []string{api.grpc.Domen},
|
CallbackHostGRPC: []string{api.grpc.Domen},
|
||||||
ReturnURL: request.Body.ReturnURL,
|
ReturnURL: request.Body.ReturnURL,
|
||||||
},
|
},
|
||||||
Phone: request.Body.PhoneNumber,
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
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
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,7 @@ type ReportHistory struct {
|
|||||||
type RawDetails struct {
|
type RawDetails struct {
|
||||||
Tariffs []Tariff `json:"tariffs" bson:"tariffs"`
|
Tariffs []Tariff `json:"tariffs" bson:"tariffs"`
|
||||||
Price int64 `json:"price" bson:"price"`
|
Price int64 `json:"price" bson:"price"`
|
||||||
|
Comment string `json:"comment" bson:"comment"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (receiver *History) Sanitize() *History {
|
func (receiver *History) Sanitize() *History {
|
||||||
|
|||||||
@ -31,17 +31,12 @@ type BankCard struct {
|
|||||||
type PaymentType string
|
type PaymentType string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
PaymentTypeBankCard PaymentType = "bankCard"
|
PaymentTypeBankCard PaymentType = "bank_сard"
|
||||||
PaymentTypeTinkoff PaymentType = "tinkoffBank"
|
PaymentTypeTinkoff PaymentType = "tinkoffBank"
|
||||||
PaymentTypeQiwi PaymentType = "qiwi"
|
|
||||||
PaymentTypeSberPay PaymentType = "sberbank"
|
PaymentTypeSberPay PaymentType = "sberbank"
|
||||||
PaymentTypeYoomoney PaymentType = "yoomoney"
|
PaymentTypeYoomoney PaymentType = "yoomoney"
|
||||||
PaymentTypeMobile PaymentType = "mobile"
|
|
||||||
PaymentTypeInstallments PaymentType = "installments"
|
|
||||||
PaymentTypeCash PaymentType = "cash"
|
|
||||||
PaymentTypeSBP PaymentType = "sbp"
|
PaymentTypeSBP PaymentType = "sbp"
|
||||||
PaymentTypeSberB2B PaymentType = "b2bSberbank"
|
PaymentTypeSberB2B PaymentType = "b2bSberbank"
|
||||||
PaymentTypeAlfabank PaymentType = "alfabank"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type PaymentEvent struct {
|
type PaymentEvent struct {
|
||||||
@ -50,5 +45,6 @@ type PaymentEvent struct {
|
|||||||
PaymentID string
|
PaymentID string
|
||||||
UserID string
|
UserID string
|
||||||
Currency string
|
Currency string
|
||||||
|
Type string
|
||||||
Amount int64
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
0x5b, 0x0a, 0x15, 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,
|
0x6b, 0x53, 0x62, 0x65, 0x72, 0x50, 0x61, 0x79, 0x12, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73,
|
||||||
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,
|
|
||||||
0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c,
|
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,
|
0x69, 0x6e, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75,
|
||||||
0x15, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x54,
|
0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69,
|
||||||
0x69, 0x6e, 0x6b, 0x6f, 0x66, 0x66, 0x12, 0x1d, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72,
|
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,
|
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,
|
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,
|
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,
|
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, 0x62, 0x65, 0x72,
|
0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x42, 0x50, 0x12,
|
||||||
0x62, 0x61, 0x6e, 0x6b, 0x42, 0x32, 0x42, 0x12, 0x23, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75,
|
0x1d, 0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50,
|
||||||
0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x32, 0x42, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x21,
|
||||||
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,
|
|
||||||
0x2e, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61,
|
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,
|
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79,
|
0x65, 0x22, 0x00, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72,
|
||||||
0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
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 (
|
var (
|
||||||
@ -505,28 +473,18 @@ var file_treasurer_service_proto_depIdxs = []int32{
|
|||||||
8, // 6: treasurer.GetB2BPaymentLinkRequest.VatData:type_name -> google.protobuf.Empty
|
8, // 6: treasurer.GetB2BPaymentLinkRequest.VatData:type_name -> google.protobuf.Empty
|
||||||
0, // 7: treasurer.TreasurerService.GetPaymentLinkBankCard:input_type -> treasurer.GetBankCardPaymentLinkRequest
|
0, // 7: treasurer.TreasurerService.GetPaymentLinkBankCard:input_type -> treasurer.GetBankCardPaymentLinkRequest
|
||||||
1, // 8: treasurer.TreasurerService.GetPaymentLinkYooMoney:input_type -> treasurer.GetPaymentLinkBody
|
1, // 8: treasurer.TreasurerService.GetPaymentLinkYooMoney:input_type -> treasurer.GetPaymentLinkBody
|
||||||
2, // 9: treasurer.TreasurerService.GetPaymentLinkQIWI:input_type -> treasurer.GetPhonePaymentLinkRequest
|
1, // 9: treasurer.TreasurerService.GetPaymentLinkSberPay:input_type -> treasurer.GetPaymentLinkBody
|
||||||
2, // 10: treasurer.TreasurerService.GetPaymentLinkSberPay:input_type -> treasurer.GetPhonePaymentLinkRequest
|
1, // 10: treasurer.TreasurerService.GetPaymentLinkTinkoff:input_type -> treasurer.GetPaymentLinkBody
|
||||||
3, // 11: treasurer.TreasurerService.GetPaymentLinkAlfaClick:input_type -> treasurer.GetLoginPaymentLinkRequest
|
1, // 11: treasurer.TreasurerService.GetPaymentLinkSberbankB2B:input_type -> treasurer.GetPaymentLinkBody
|
||||||
1, // 12: treasurer.TreasurerService.GetPaymentLinkTinkoff:input_type -> treasurer.GetPaymentLinkBody
|
1, // 12: treasurer.TreasurerService.GetPaymentLinkSBP:input_type -> treasurer.GetPaymentLinkBody
|
||||||
4, // 13: treasurer.TreasurerService.GetPaymentLinkSberbankB2B:input_type -> treasurer.GetB2BPaymentLinkRequest
|
5, // 13: treasurer.TreasurerService.GetPaymentLinkBankCard:output_type -> treasurer.GetPaymentLinkResponse
|
||||||
1, // 14: treasurer.TreasurerService.GetPaymentLinkSBP:input_type -> treasurer.GetPaymentLinkBody
|
5, // 14: treasurer.TreasurerService.GetPaymentLinkYooMoney:output_type -> treasurer.GetPaymentLinkResponse
|
||||||
2, // 15: treasurer.TreasurerService.GetPaymentLinkMobile:input_type -> treasurer.GetPhonePaymentLinkRequest
|
5, // 15: treasurer.TreasurerService.GetPaymentLinkSberPay:output_type -> treasurer.GetPaymentLinkResponse
|
||||||
2, // 16: treasurer.TreasurerService.GetPaymentLinkCash:input_type -> treasurer.GetPhonePaymentLinkRequest
|
5, // 16: treasurer.TreasurerService.GetPaymentLinkTinkoff:output_type -> treasurer.GetPaymentLinkResponse
|
||||||
1, // 17: treasurer.TreasurerService.GetPaymentLinkInstallments:input_type -> treasurer.GetPaymentLinkBody
|
5, // 17: treasurer.TreasurerService.GetPaymentLinkSberbankB2B:output_type -> treasurer.GetPaymentLinkResponse
|
||||||
5, // 18: treasurer.TreasurerService.GetPaymentLinkBankCard:output_type -> treasurer.GetPaymentLinkResponse
|
5, // 18: treasurer.TreasurerService.GetPaymentLinkSBP:output_type -> treasurer.GetPaymentLinkResponse
|
||||||
5, // 19: treasurer.TreasurerService.GetPaymentLinkYooMoney:output_type -> treasurer.GetPaymentLinkResponse
|
13, // [13:19] is the sub-list for method output_type
|
||||||
5, // 20: treasurer.TreasurerService.GetPaymentLinkQIWI:output_type -> treasurer.GetPaymentLinkResponse
|
7, // [7:13] is the sub-list for method input_type
|
||||||
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
|
|
||||||
7, // [7:7] is the sub-list for extension type_name
|
7, // [7:7] is the sub-list for extension type_name
|
||||||
7, // [7:7] is the sub-list for extension extendee
|
7, // [7:7] is the sub-list for extension extendee
|
||||||
0, // [0:7] is the sub-list for field type_name
|
0, // [0:7] is the sub-list for field type_name
|
||||||
|
|||||||
@ -24,15 +24,10 @@ const _ = grpc.SupportPackageIsVersion7
|
|||||||
type TreasurerServiceClient interface {
|
type TreasurerServiceClient interface {
|
||||||
GetPaymentLinkBankCard(ctx context.Context, in *GetBankCardPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
GetPaymentLinkBankCard(ctx context.Context, in *GetBankCardPaymentLinkRequest, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error)
|
||||||
GetPaymentLinkYooMoney(ctx context.Context, in *GetPaymentLinkBody, 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 *GetPaymentLinkBody, 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)
|
|
||||||
GetPaymentLinkTinkoff(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)
|
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 {
|
type treasurerServiceClient struct {
|
||||||
@ -61,16 +56,7 @@ func (c *treasurerServiceClient) GetPaymentLinkYooMoney(ctx context.Context, in
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *treasurerServiceClient) GetPaymentLinkQIWI(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/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) {
|
|
||||||
out := new(GetPaymentLinkResponse)
|
out := new(GetPaymentLinkResponse)
|
||||||
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkSberPay", in, out, opts...)
|
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkSberPay", in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -79,15 +65,6 @@ func (c *treasurerServiceClient) GetPaymentLinkSberPay(ctx context.Context, in *
|
|||||||
return out, nil
|
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) {
|
func (c *treasurerServiceClient) GetPaymentLinkTinkoff(ctx context.Context, in *GetPaymentLinkBody, opts ...grpc.CallOption) (*GetPaymentLinkResponse, error) {
|
||||||
out := new(GetPaymentLinkResponse)
|
out := new(GetPaymentLinkResponse)
|
||||||
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkTinkoff", in, out, opts...)
|
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
|
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)
|
out := new(GetPaymentLinkResponse)
|
||||||
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkSberbankB2B", in, out, opts...)
|
err := c.cc.Invoke(ctx, "/treasurer.TreasurerService/GetPaymentLinkSberbankB2B", in, out, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -115,48 +92,16 @@ func (c *treasurerServiceClient) GetPaymentLinkSBP(ctx context.Context, in *GetP
|
|||||||
return out, nil
|
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.
|
// TreasurerServiceServer is the server API for TreasurerService service.
|
||||||
// All implementations should embed UnimplementedTreasurerServiceServer
|
// All implementations should embed UnimplementedTreasurerServiceServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
type TreasurerServiceServer interface {
|
type TreasurerServiceServer interface {
|
||||||
GetPaymentLinkBankCard(context.Context, *GetBankCardPaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
GetPaymentLinkBankCard(context.Context, *GetBankCardPaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
||||||
GetPaymentLinkYooMoney(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error)
|
GetPaymentLinkYooMoney(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error)
|
||||||
GetPaymentLinkQIWI(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
GetPaymentLinkSberPay(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error)
|
||||||
GetPaymentLinkSberPay(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
|
||||||
GetPaymentLinkAlfaClick(context.Context, *GetLoginPaymentLinkRequest) (*GetPaymentLinkResponse, error)
|
|
||||||
GetPaymentLinkTinkoff(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)
|
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.
|
// 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) {
|
func (UnimplementedTreasurerServiceServer) GetPaymentLinkYooMoney(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkYooMoney not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkYooMoney not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkQIWI(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error) {
|
func (UnimplementedTreasurerServiceServer) GetPaymentLinkSberPay(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkQIWI not implemented")
|
|
||||||
}
|
|
||||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkSberPay(context.Context, *GetPhonePaymentLinkRequest) (*GetPaymentLinkResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkSberPay not implemented")
|
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) {
|
func (UnimplementedTreasurerServiceServer) GetPaymentLinkTinkoff(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkTinkoff not implemented")
|
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")
|
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkSberbankB2B not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedTreasurerServiceServer) GetPaymentLinkSBP(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error) {
|
func (UnimplementedTreasurerServiceServer) GetPaymentLinkSBP(context.Context, *GetPaymentLinkBody) (*GetPaymentLinkResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentLinkSBP not implemented")
|
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.
|
// 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
|
// 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)
|
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) {
|
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 {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -275,25 +187,7 @@ func _TreasurerService_GetPaymentLinkSberPay_Handler(srv interface{}, ctx contex
|
|||||||
FullMethod: "/treasurer.TreasurerService/GetPaymentLinkSberPay",
|
FullMethod: "/treasurer.TreasurerService/GetPaymentLinkSberPay",
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(TreasurerServiceServer).GetPaymentLinkSberPay(ctx, req.(*GetPhonePaymentLinkRequest))
|
return srv.(TreasurerServiceServer).GetPaymentLinkSberPay(ctx, req.(*GetPaymentLinkBody))
|
||||||
}
|
|
||||||
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 interceptor(ctx, in, info, handler)
|
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) {
|
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 {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -329,7 +223,7 @@ func _TreasurerService_GetPaymentLinkSberbankB2B_Handler(srv interface{}, ctx co
|
|||||||
FullMethod: "/treasurer.TreasurerService/GetPaymentLinkSberbankB2B",
|
FullMethod: "/treasurer.TreasurerService/GetPaymentLinkSberbankB2B",
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
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)
|
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)
|
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.
|
// TreasurerService_ServiceDesc is the grpc.ServiceDesc for TreasurerService service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -421,18 +261,10 @@ var TreasurerService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "GetPaymentLinkYooMoney",
|
MethodName: "GetPaymentLinkYooMoney",
|
||||||
Handler: _TreasurerService_GetPaymentLinkYooMoney_Handler,
|
Handler: _TreasurerService_GetPaymentLinkYooMoney_Handler,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
MethodName: "GetPaymentLinkQIWI",
|
|
||||||
Handler: _TreasurerService_GetPaymentLinkQIWI_Handler,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
MethodName: "GetPaymentLinkSberPay",
|
MethodName: "GetPaymentLinkSberPay",
|
||||||
Handler: _TreasurerService_GetPaymentLinkSberPay_Handler,
|
Handler: _TreasurerService_GetPaymentLinkSberPay_Handler,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
MethodName: "GetPaymentLinkAlfaClick",
|
|
||||||
Handler: _TreasurerService_GetPaymentLinkAlfaClick_Handler,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
MethodName: "GetPaymentLinkTinkoff",
|
MethodName: "GetPaymentLinkTinkoff",
|
||||||
Handler: _TreasurerService_GetPaymentLinkTinkoff_Handler,
|
Handler: _TreasurerService_GetPaymentLinkTinkoff_Handler,
|
||||||
@ -445,18 +277,6 @@ var TreasurerService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "GetPaymentLinkSBP",
|
MethodName: "GetPaymentLinkSBP",
|
||||||
Handler: _TreasurerService_GetPaymentLinkSBP_Handler,
|
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{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "treasurer/service.proto",
|
Metadata: "treasurer/service.proto",
|
||||||
|
|||||||
@ -82,16 +82,20 @@ func (receiver *PaymentCallbackService) SuccessEvent(ctx context.Context, event
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
//go func() {
|
||||||
if _, err := receiver.historyService.CreateHistory(ctx, &models.History{
|
if _, err := receiver.historyService.CreateHistory(ctx, &models.History{
|
||||||
UserID: account.UserID,
|
UserID: account.UserID,
|
||||||
Comment: event.Message,
|
Comment: event.Message,
|
||||||
Key: event.Key,
|
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 {
|
}); err != nil {
|
||||||
receiver.logger.Error("failed to create history on <SuccessEvent> of <PaymentCallbackService>", zap.Error(err))
|
receiver.logger.Error("failed to create history on <SuccessEvent> of <PaymentCallbackService>", zap.Error(err))
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
}()
|
//}()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,17 +131,17 @@ func (receiver *Service) ReplenishAccountWallet(ctx context.Context, request *mo
|
|||||||
return nil, changeErr
|
return nil, changeErr
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
// go func() {
|
||||||
if _, historyErr := receiver.historyService.CreateHistory(ctx, &models.History{
|
// if _, historyErr := receiver.historyService.CreateHistory(ctx, &models.History{
|
||||||
Key: models.CustomerHistoryKeyReplenish,
|
// Key: models.CustomerHistoryKeyReplenish,
|
||||||
UserID: request.Account.UserID,
|
// UserID: request.Account.UserID,
|
||||||
Comment: "Успешное пополнение средств (Без конвертации валюты)",
|
// Comment: "Успешное пополнение средств (Без конвертации валюты)",
|
||||||
// RawDetails: fmt.Sprintf("%d%s", cash, models.InternalCurrencyKey),
|
// // RawDetails: fmt.Sprintf("%d%s", cash, models.InternalCurrencyKey),
|
||||||
}); historyErr != nil {
|
// }); historyErr != nil {
|
||||||
receiver.logger.Error("failed to insert history on <ReplenishAccountWallet> of <WalletService>", zap.Error(historyErr))
|
// receiver.logger.Error("failed to insert history on <ReplenishAccountWallet> of <WalletService>", zap.Error(historyErr))
|
||||||
}
|
// }
|
||||||
}()
|
// }()
|
||||||
|
//
|
||||||
return updatedAccount, nil
|
return updatedAccount, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,16 +175,16 @@ func (receiver *Service) ReplenishAccountWallet(ctx context.Context, request *mo
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
// go func() {
|
||||||
if _, historyErr := receiver.historyService.CreateHistory(ctx, &models.History{
|
// if _, historyErr := receiver.historyService.CreateHistory(ctx, &models.History{
|
||||||
Key: models.CustomerHistoryKeyReplenish,
|
// Key: models.CustomerHistoryKeyReplenish,
|
||||||
UserID: request.Account.UserID,
|
// UserID: request.Account.UserID,
|
||||||
Comment: "Успешное пополнение средств (C конвертацией валюты)",
|
// Comment: "Успешное пополнение средств (C конвертацией валюты)",
|
||||||
//RawDetails: fmt.Sprintf("%d%s", cash, request.Currency),
|
// //RawDetails: fmt.Sprintf("%d%s", cash, request.Currency),
|
||||||
}); historyErr != nil {
|
// }); historyErr != nil {
|
||||||
receiver.logger.Error("failed to insert history on <ReplenishAccountWallet> of <WalletService>", zap.Error(historyErr))
|
// receiver.logger.Error("failed to insert history on <ReplenishAccountWallet> of <WalletService>", zap.Error(historyErr))
|
||||||
}
|
// }
|
||||||
}()
|
// }()
|
||||||
|
|
||||||
return updatedAccount, nil
|
return updatedAccount, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package utils
|
|||||||
import (
|
import (
|
||||||
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/errors"
|
"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/internal/models"
|
||||||
"penahub.gitlab.yandexcloud.net/pena-services/customer/pkg/validate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func ValidateGetPaymentLinkBody(request *models.GetPaymentLinkBody) errors.Error {
|
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)
|
return errors.NewWithMessage("request body is empty", errors.ErrInvalidArgs)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch request.Type {
|
return nil
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
main
BIN
main
Binary file not shown.
Loading…
Reference in New Issue
Block a user