fixed mntx op provisioning #405
@@ -14,7 +14,7 @@ when:
|
|||||||
- api/server/**
|
- api/server/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ when:
|
|||||||
- api/billing/documents/**
|
- api/billing/documents/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ when:
|
|||||||
- api/billing/fees/**
|
- api/billing/fees/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
exclude: ['**']
|
||||||
|
ignore_message: '[infra]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ when:
|
|||||||
- api/discovery/**
|
- api/discovery/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ when:
|
|||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- frontend/**
|
- frontend/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ when:
|
|||||||
- api/fx/storage/**
|
- api/fx/storage/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ when:
|
|||||||
- api/fx/storage/**
|
- api/fx/storage/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ when:
|
|||||||
- api/gateway/chain/**
|
- api/gateway/chain/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ when:
|
|||||||
- api/gateway/mntx/**
|
- api/gateway/mntx/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ when:
|
|||||||
- api/gateway/tgsettle/**
|
- api/gateway/tgsettle/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ when:
|
|||||||
- api/gateway/tron/**
|
- api/gateway/tron/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ when:
|
|||||||
- api/ledger/**
|
- api/ledger/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
path:
|
||||||
|
exclude: ['**']
|
||||||
|
ignore_message: '[infra]'
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ when:
|
|||||||
- api/notification/**
|
- api/notification/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ when:
|
|||||||
- api/payments/orchestrator/**
|
- api/payments/orchestrator/**
|
||||||
- api/proto/**
|
- api/proto/**
|
||||||
- api/pkg/**
|
- api/pkg/**
|
||||||
ignore_message: '[REBUILD]'
|
ignore_message: '[rebuild]'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: version
|
- name: version
|
||||||
|
|||||||
@@ -151,7 +151,9 @@ func operationFromCardPayout(req *mntxv1.CardPayoutRequest) (*connectorv1.Operat
|
|||||||
money := moneyFromMinor(req.GetAmountMinor(), req.GetCurrency())
|
money := moneyFromMinor(req.GetAmountMinor(), req.GetCurrency())
|
||||||
op := &connectorv1.Operation{
|
op := &connectorv1.Operation{
|
||||||
Type: connectorv1.OperationType_PAYOUT,
|
Type: connectorv1.OperationType_PAYOUT,
|
||||||
IdempotencyKey: strings.TrimSpace(req.GetPayoutId()),
|
IdempotencyKey: strings.TrimSpace(req.GetIdempotencyKey()),
|
||||||
|
OperationRef: strings.TrimSpace(req.GetOperationRef()),
|
||||||
|
IntentRef: strings.TrimSpace(req.GetIntentRef()),
|
||||||
Money: money,
|
Money: money,
|
||||||
Params: structFromMap(params),
|
Params: structFromMap(params),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ monetix:
|
|||||||
gateway:
|
gateway:
|
||||||
id: "monetix"
|
id: "monetix"
|
||||||
is_enabled: true
|
is_enabled: true
|
||||||
network: "VISA_DIRECT"
|
network: "MIR"
|
||||||
currencies: ["RUB"]
|
currencies: ["RUB"]
|
||||||
limits:
|
limits:
|
||||||
min_amount: "0"
|
min_amount: "0"
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ monetix:
|
|||||||
gateway:
|
gateway:
|
||||||
id: "monetix"
|
id: "monetix"
|
||||||
is_enabled: true
|
is_enabled: true
|
||||||
network: "VISA_DIRECT"
|
network: "MIR"
|
||||||
currencies: ["RUB"]
|
currencies: ["RUB"]
|
||||||
limits:
|
limits:
|
||||||
min_amount: "0"
|
min_amount: "0"
|
||||||
|
|||||||
@@ -129,6 +129,8 @@ func (p *cardPayoutProcessor) Submit(ctx context.Context, req *mntxv1.CardPayout
|
|||||||
zap.String("customer_id", state.CustomerID),
|
zap.String("customer_id", state.CustomerID),
|
||||||
zap.String("operation_ref", state.OperationRef),
|
zap.String("operation_ref", state.OperationRef),
|
||||||
zap.String("idempotency_key", state.IdempotencyKey),
|
zap.String("idempotency_key", state.IdempotencyKey),
|
||||||
|
zap.String("operation_ref", state.OperationRef),
|
||||||
|
zap.String("intent_ref", state.IntentRef),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,6 +140,8 @@ func (p *cardPayoutProcessor) Submit(ctx context.Context, req *mntxv1.CardPayout
|
|||||||
zap.String("customer_id", state.CustomerID),
|
zap.String("customer_id", state.CustomerID),
|
||||||
zap.String("operation_ref", state.OperationRef),
|
zap.String("operation_ref", state.OperationRef),
|
||||||
zap.String("idempotency_key", state.IdempotencyKey),
|
zap.String("idempotency_key", state.IdempotencyKey),
|
||||||
|
zap.String("operation_ref", state.OperationRef),
|
||||||
|
zap.String("intent_ref", state.IntentRef),
|
||||||
)
|
)
|
||||||
|
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
@@ -49,9 +49,18 @@ func (s *Service) SubmitOperation(ctx context.Context, req *connectorv1.SubmitOp
|
|||||||
return &connectorv1.SubmitOperationResponse{Receipt: &connectorv1.OperationReceipt{Error: connectorError(connectorv1.ErrorCode_INVALID_PARAMS, "submit_operation: operation is required", nil, "")}}, nil
|
return &connectorv1.SubmitOperationResponse{Receipt: &connectorv1.OperationReceipt{Error: connectorError(connectorv1.ErrorCode_INVALID_PARAMS, "submit_operation: operation is required", nil, "")}}, nil
|
||||||
}
|
}
|
||||||
op := req.GetOperation()
|
op := req.GetOperation()
|
||||||
if strings.TrimSpace(op.GetIdempotencyKey()) == "" {
|
idempotencyKey := strings.TrimSpace(op.GetIdempotencyKey())
|
||||||
|
if idempotencyKey == "" {
|
||||||
return &connectorv1.SubmitOperationResponse{Receipt: &connectorv1.OperationReceipt{Error: connectorError(connectorv1.ErrorCode_INVALID_PARAMS, "submit_operation: idempotency_key is required", op, "")}}, nil
|
return &connectorv1.SubmitOperationResponse{Receipt: &connectorv1.OperationReceipt{Error: connectorError(connectorv1.ErrorCode_INVALID_PARAMS, "submit_operation: idempotency_key is required", op, "")}}, nil
|
||||||
}
|
}
|
||||||
|
operationRef := strings.TrimSpace(op.GetOperationRef())
|
||||||
|
if operationRef == "" {
|
||||||
|
return &connectorv1.SubmitOperationResponse{Receipt: &connectorv1.OperationReceipt{Error: connectorError(connectorv1.ErrorCode_INVALID_PARAMS, "submit_operation: operation_ref is required", op, "")}}, nil
|
||||||
|
}
|
||||||
|
intentRef := strings.TrimSpace(op.GetIntentRef())
|
||||||
|
if intentRef == "" {
|
||||||
|
return &connectorv1.SubmitOperationResponse{Receipt: &connectorv1.OperationReceipt{Error: connectorError(connectorv1.ErrorCode_INVALID_PARAMS, "submit_operation: intent_ref is required", op, "")}}, nil
|
||||||
|
}
|
||||||
if op.GetType() != connectorv1.OperationType_PAYOUT {
|
if op.GetType() != connectorv1.OperationType_PAYOUT {
|
||||||
return &connectorv1.SubmitOperationResponse{Receipt: &connectorv1.OperationReceipt{Error: connectorError(connectorv1.ErrorCode_UNSUPPORTED_OPERATION, "submit_operation: unsupported operation type", op, "")}}, nil
|
return &connectorv1.SubmitOperationResponse{Receipt: &connectorv1.OperationReceipt{Error: connectorError(connectorv1.ErrorCode_UNSUPPORTED_OPERATION, "submit_operation: unsupported operation type", op, "")}}, nil
|
||||||
}
|
}
|
||||||
@@ -73,7 +82,8 @@ func (s *Service) SubmitOperation(ctx context.Context, req *connectorv1.SubmitOp
|
|||||||
}
|
}
|
||||||
return &connectorv1.SubmitOperationResponse{Receipt: payoutReceipt(resp.GetPayout())}, nil
|
return &connectorv1.SubmitOperationResponse{Receipt: payoutReceipt(resp.GetPayout())}, nil
|
||||||
}
|
}
|
||||||
resp, err := s.CreateCardPayout(ctx, buildCardPayoutRequestFromParams(reader, payoutID, amountMinor, currency))
|
cr := buildCardPayoutRequestFromParams(reader, payoutID, idempotencyKey, operationRef, intentRef, amountMinor, currency)
|
||||||
|
resp, err := s.CreateCardPayout(ctx, cr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &connectorv1.SubmitOperationResponse{Receipt: &connectorv1.OperationReceipt{Error: connectorError(mapErrorCode(err), err.Error(), op, "")}}, nil
|
return &connectorv1.SubmitOperationResponse{Receipt: &connectorv1.OperationReceipt{Error: connectorError(mapErrorCode(err), err.Error(), op, "")}}, nil
|
||||||
}
|
}
|
||||||
@@ -183,7 +193,9 @@ func buildCardTokenPayoutRequestFromParams(reader params.Reader, payoutID string
|
|||||||
return req
|
return req
|
||||||
}
|
}
|
||||||
|
|
||||||
func buildCardPayoutRequestFromParams(reader params.Reader, payoutID string, amountMinor int64, currency string) *mntxv1.CardPayoutRequest {
|
func buildCardPayoutRequestFromParams(reader params.Reader,
|
||||||
|
payoutID, idempotencyKey, operationRef, intentRef string,
|
||||||
|
amountMinor int64, currency string) *mntxv1.CardPayoutRequest {
|
||||||
return &mntxv1.CardPayoutRequest{
|
return &mntxv1.CardPayoutRequest{
|
||||||
PayoutId: payoutID,
|
PayoutId: payoutID,
|
||||||
ProjectId: readerInt64(reader, "project_id"),
|
ProjectId: readerInt64(reader, "project_id"),
|
||||||
@@ -204,6 +216,9 @@ func buildCardPayoutRequestFromParams(reader params.Reader, payoutID string, amo
|
|||||||
CardExpMonth: uint32(readerInt64(reader, "card_exp_month")),
|
CardExpMonth: uint32(readerInt64(reader, "card_exp_month")),
|
||||||
CardHolder: strings.TrimSpace(reader.String("card_holder")),
|
CardHolder: strings.TrimSpace(reader.String("card_holder")),
|
||||||
Metadata: reader.StringMap("metadata"),
|
Metadata: reader.StringMap("metadata"),
|
||||||
|
OperationRef: operationRef,
|
||||||
|
IdempotencyKey: idempotencyKey,
|
||||||
|
IntentRef: intentRef,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import (
|
|||||||
"github.com/tech/sendico/pkg/mutil/mzap"
|
"github.com/tech/sendico/pkg/mutil/mzap"
|
||||||
"github.com/tech/sendico/pkg/payments/rail"
|
"github.com/tech/sendico/pkg/payments/rail"
|
||||||
paytypes "github.com/tech/sendico/pkg/payments/types"
|
paytypes "github.com/tech/sendico/pkg/payments/types"
|
||||||
gatewayv1 "github.com/tech/sendico/pkg/proto/common/gateway/v1"
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -37,15 +36,6 @@ func toOpStatus(t *model.CardPayout) rail.OperationResult {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func toError(t *model.CardPayout) *gatewayv1.OperationError {
|
|
||||||
if t.Status == model.PayoutStatusSuccess {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return &gatewayv1.OperationError{
|
|
||||||
Message: t.FailureReason,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *cardPayoutProcessor) updatePayoutStatus(ctx context.Context, state *model.CardPayout) error {
|
func (p *cardPayoutProcessor) updatePayoutStatus(ctx context.Context, state *model.CardPayout) error {
|
||||||
if err := p.store.Payouts().Upsert(ctx, state); err != nil {
|
if err := p.store.Payouts().Upsert(ctx, state); err != nil {
|
||||||
p.logger.Warn("Failed to update transfer status", zap.String("transfer_ref", state.PayoutID), zap.String("status", string(state.Status)), zap.Error(err))
|
p.logger.Warn("Failed to update transfer status", zap.String("transfer_ref", state.PayoutID), zap.String("status", string(state.Status)), zap.Error(err))
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Service) submitCardPayout(ctx context.Context, payment *model.Payment) error {
|
func (s *Service) submitCardPayout(ctx context.Context, operationRef string, payment *model.Payment) error {
|
||||||
if payment == nil {
|
if payment == nil {
|
||||||
return merrors.InvalidArgument("payment is required")
|
return merrors.InvalidArgument("payment is required")
|
||||||
}
|
}
|
||||||
@@ -133,6 +133,8 @@ func (s *Service) submitCardPayout(ctx context.Context, payment *model.Payment)
|
|||||||
CardExpMonth: card.ExpMonth,
|
CardExpMonth: card.ExpMonth,
|
||||||
CardHolder: holder,
|
CardHolder: holder,
|
||||||
Metadata: meta,
|
Metadata: meta,
|
||||||
|
IntentRef: payment.Intent.Ref,
|
||||||
|
OperationRef: operationRef,
|
||||||
}
|
}
|
||||||
resp, err := s.deps.mntx.client.CreateCardPayout(ctx, req)
|
resp, err := s.deps.mntx.client.CreateCardPayout(ctx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -173,7 +175,8 @@ func (s *Service) submitCardPayout(ctx context.Context, payment *model.Payment)
|
|||||||
updateExecutionPlanTotalNetworkFee(plan)
|
updateExecutionPlanTotalNetworkFee(plan)
|
||||||
}
|
}
|
||||||
|
|
||||||
s.logger.Info("card payout submitted", zap.String("payment_ref", payment.PaymentRef), zap.String("payout_id", exec.CardPayoutRef))
|
s.logger.Info("card payout submitted", zap.String("payment_ref", payment.PaymentRef),
|
||||||
|
zap.String("payout_id", exec.CardPayoutRef), zap.String("operation_ref", state.OperationRef))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ func TestSubmitCardPayout_UsesSettlementAmount(t *testing.T) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := svc.submitCardPayout(ctx, payment); err != nil {
|
if err := svc.submitCardPayout(ctx, "op-ref", payment); err != nil {
|
||||||
t.Fatalf("submitCardPayout error: %v", err)
|
t.Fatalf("submitCardPayout error: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ type paymentEventHandler struct {
|
|||||||
repo storage.Repository
|
repo storage.Repository
|
||||||
ensureRepo func(ctx context.Context) error
|
ensureRepo func(ctx context.Context) error
|
||||||
logger mlogger.Logger
|
logger mlogger.Logger
|
||||||
submitCardPayout func(ctx context.Context, payment *model.Payment) error
|
submitCardPayout func(ctx context.Context, operationRef string, payment *model.Payment) error
|
||||||
resumePlan func(ctx context.Context, store storage.PaymentsStore, payment *model.Payment) error
|
resumePlan func(ctx context.Context, store storage.PaymentsStore, payment *model.Payment) error
|
||||||
releaseHold func(ctx context.Context, store storage.PaymentsStore, payment *model.Payment) error
|
releaseHold func(ctx context.Context, store storage.PaymentsStore, payment *model.Payment) error
|
||||||
}
|
}
|
||||||
|
|
||||||
func newPaymentEventHandler(repo storage.Repository, ensure func(ctx context.Context) error, logger mlogger.Logger, submitCardPayout func(ctx context.Context, payment *model.Payment) error, resumePlan func(ctx context.Context, store storage.PaymentsStore, payment *model.Payment) error, releaseHold func(ctx context.Context, store storage.PaymentsStore, payment *model.Payment) error) *paymentEventHandler {
|
func newPaymentEventHandler(repo storage.Repository, ensure func(ctx context.Context) error, logger mlogger.Logger, submitCardPayout func(ctx context.Context, operationRef string, payment *model.Payment) error, resumePlan func(ctx context.Context, store storage.PaymentsStore, payment *model.Payment) error, releaseHold func(ctx context.Context, store storage.PaymentsStore, payment *model.Payment) error) *paymentEventHandler {
|
||||||
return &paymentEventHandler{
|
return &paymentEventHandler{
|
||||||
repo: repo,
|
repo: repo,
|
||||||
ensureRepo: ensure,
|
ensureRepo: ensure,
|
||||||
@@ -140,7 +140,7 @@ func (h *paymentEventHandler) processTransferUpdate(ctx context.Context, req *or
|
|||||||
payment.State = model.PaymentStateFundsReserved
|
payment.State = model.PaymentStateFundsReserved
|
||||||
if h.submitCardPayout == nil {
|
if h.submitCardPayout == nil {
|
||||||
h.logger.Warn("card payout execution skipped", zap.String("payment_ref", payment.PaymentRef))
|
h.logger.Warn("card payout execution skipped", zap.String("payment_ref", payment.PaymentRef))
|
||||||
} else if err := h.submitCardPayout(ctx, payment); err != nil {
|
} else if err := h.submitCardPayout(ctx, transfer.GetOperationRef(), payment); err != nil {
|
||||||
payment.State = model.PaymentStateFailed
|
payment.State = model.PaymentStateFailed
|
||||||
payment.FailureCode = model.PaymentFailureCodePolicy
|
payment.FailureCode = model.PaymentFailureCodePolicy
|
||||||
payment.FailureReason = strings.TrimSpace(err.Error())
|
payment.FailureReason = strings.TrimSpace(err.Error())
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ func TestProcessTransferUpdateHandler_CardFundingWaitsForSources(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
payoutCalls := 0
|
payoutCalls := 0
|
||||||
submit := func(ctx context.Context, payment *model.Payment) error {
|
submit := func(ctx context.Context, operationRef string, payment *model.Payment) error {
|
||||||
payoutCalls++
|
payoutCalls++
|
||||||
if payment.Execution == nil {
|
if payment.Execution == nil {
|
||||||
payment.Execution = &model.ExecutionRefs{}
|
payment.Execution = &model.ExecutionRefs{}
|
||||||
@@ -279,6 +279,7 @@ func TestProcessTransferUpdateHandler_CardFundingWaitsForSources(t *testing.T) {
|
|||||||
step := ensureExecutionStep(plan, stepCodeCardPayout)
|
step := ensureExecutionStep(plan, stepCodeCardPayout)
|
||||||
setExecutionStepRole(step, executionStepRoleConsumer)
|
setExecutionStepRole(step, executionStepRoleConsumer)
|
||||||
step.TransferRef = "payout-1"
|
step.TransferRef = "payout-1"
|
||||||
|
step.OperationRef = operationRef
|
||||||
setExecutionStepStatus(step, model.OperationStateWaiting)
|
setExecutionStepStatus(step, model.OperationStateWaiting)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user