fixed verification code
All checks were successful
ci/woodpecker/push/billing_documents Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/discovery Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/gateway_chain Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/gateway_mntx Pipeline was successful
ci/woodpecker/push/gateway_tgsettle Pipeline was successful
ci/woodpecker/push/gateway_tron Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful

This commit is contained in:
Stephan D
2026-02-09 16:43:25 +01:00
83 changed files with 1331 additions and 415 deletions

View File

@@ -196,6 +196,9 @@ func updateExecutionStepsFromGatewayExecution(
}
setExecutionStepStatus(execStep, status)
if exec.Error != "" && execStep.Error == "" {
execStep.Error = strings.TrimSpace(exec.Error)
}
log.Debug("Execution step state updated",
zap.Int("step_index", idx),

View File

@@ -60,9 +60,17 @@ func TestGatewayExecutionRejectedFailsPayment(t *testing.T) {
payment := &paymodel.Payment{
PaymentRef: "pi-2", State: paymodel.PaymentStateSubmitted, IdempotencyKey: "idem-1",
PaymentPlan: &paymodel.PaymentPlan{
Steps: []*paymodel.PaymentStep{
{StepID: "crypto_send"},
},
},
ExecutionPlan: &paymodel.ExecutionPlan{
Steps: []*paymodel.ExecutionStep{
{OperationRef: "s1", State: paymodel.OperationStatePlanned, TransferRef: "trn-1"}}}}
{Code: "crypto_send", OperationRef: "s1", State: paymodel.OperationStateWaiting, TransferRef: "trn-1"},
},
},
}
if err := store.Create(context.Background(), payment); err != nil {
t.Fatalf("failed to seed payment: %v", err)
@@ -74,9 +82,11 @@ func TestGatewayExecutionRejectedFailsPayment(t *testing.T) {
}
exec := &model.PaymentGatewayExecution{
PaymentRef: "pi-2",
TransferRef: "trn-1",
Status: rail.OperationResultFailed,
PaymentRef: "pi-2",
OperationRef: "s1",
TransferRef: "trn-1",
Status: rail.OperationResultFailed,
Error: "execution_plan_failed",
}
if err := svc.onGatewayExecution(context.Background(), exec); err != nil {

View File

@@ -81,6 +81,7 @@ func (p *paymentExecutor) pickIndependentSteps(
if blocked {
lg.Debug("Step permanently blocked by dependency failure")
setExecutionStepStatus(execStep, model.OperationStateCancelled)
continue
}

View File

@@ -66,8 +66,8 @@ func TestReleasePaymentHold_RejectsLegacyLedgerRelease(t *testing.T) {
store.payments[payment.PaymentRef] = payment
execPlan := ensureExecutionPlanForPlan(payment, payment.PaymentPlan)
steps := executionStepsByCode(execPlan)
payment.ExecutionPlan = ensureExecutionPlanForPlan(payment, payment.PaymentPlan)
steps := executionStepsByCode(payment.ExecutionPlan)
blockStep := steps["ledger_block"]
if blockStep == nil {
t.Fatalf("expected block step in execution plan")