refactored payment orchestration

This commit is contained in:
Stephan D
2026-02-03 00:40:46 +01:00
parent 05d998e0f7
commit 5e87e2f2f9
184 changed files with 3920 additions and 2219 deletions

View File

@@ -2,6 +2,9 @@ syntax = "proto3";
package common.gateway.v1;
option go_package = "github.com/tech/sendico/pkg/proto/common/gateway/v1;gatewayv1";
import "common/money/v1/money.proto";
enum Operation {
OPERATION_UNSPECIFIED = 0;
OPERATION_AUTHORIZE = 1;
@@ -162,3 +165,26 @@ message GatewayInstanceDescriptor {
string version = 7;
bool is_enabled = 8;
}
// OperationResult represents the outcome status of an operation in a gateway
enum OperationResult {
OPERATION_RESULT_UNSPECIFIED = 0;
OPERATION_RESULT_SUCCESS = 1;
OPERATION_RESULT_FAILED = 2;
OPERATION_RESULT_CANCELLED = 3;
}
message OperationError {
string code = 1;
string message = 2;
bool can_retry = 3;
bool should_rollback = 4;
}
message OperationExecutionStatus {
string idempotency_key = 1;
string operation_ref = 2;
common.money.v1.Money executed_money = 3;
OperationResult status = 4;
OperationError error = 5;
}