missing proto definition
This commit is contained in:
@@ -46,10 +46,6 @@ func (s *svc) ExecutePayment(ctx context.Context, req *orchestrationv2.ExecutePa
|
||||
logger.Debug("Completed payment execution", fields...)
|
||||
}(time.Now())
|
||||
|
||||
if req != nil && strings.TrimSpace(req.GetIntentRef()) != "" {
|
||||
return nil, merrors.InvalidArgument("intent_ref is no longer supported for ExecutePayment")
|
||||
}
|
||||
|
||||
requestCtx, fingerprint, err := s.prepareExecute(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -103,28 +103,6 @@ func TestExecutePayment_IdempotencyMismatch(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestExecutePayment_RejectsDeprecatedIntentRef(t *testing.T) {
|
||||
env := newTestEnv(t, func(_ string, req sexec.StepRequest) (*sexec.ExecuteOutput, error) {
|
||||
step := req.StepExecution
|
||||
step.State = agg.StepStateCompleted
|
||||
return &sexec.ExecuteOutput{StepExecution: step}, nil
|
||||
})
|
||||
env.quotes.Put(newExecutableQuote(env.orgID, "quote-sync", "intent-sync", buildLedgerRoute()))
|
||||
|
||||
_, err := env.svc.ExecutePayment(context.Background(), &orchestrationv2.ExecutePaymentRequest{
|
||||
Meta: testMeta(env.orgID, "idem-intent-ref"),
|
||||
QuotationRef: "quote-sync",
|
||||
ClientPaymentRef: "client-1",
|
||||
IntentRef: "intent-sync",
|
||||
})
|
||||
if !errors.Is(err, merrors.ErrInvalidArg) {
|
||||
t.Fatalf("expected invalid argument for deprecated intent_ref, got %v", err)
|
||||
}
|
||||
if got := err.Error(); !strings.Contains(got, "intent_ref is no longer supported for ExecutePayment") {
|
||||
t.Fatalf("unexpected error message: %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestExecutePayment_BatchQuoteRequiresBatchExecution(t *testing.T) {
|
||||
env := newTestEnv(t, func(_ string, req sexec.StepRequest) (*sexec.ExecuteOutput, error) {
|
||||
step := req.StepExecution
|
||||
|
||||
Reference in New Issue
Block a user