diff --git a/api/api.yaml b/api/api.yaml index 701a1b1c4..f9982d824 100644 --- a/api/api.yaml +++ b/api/api.yaml @@ -2496,7 +2496,7 @@ components: required: - id - issuerDID - - recipientDID + - userDID - paymentOptionID - payments - createdAt @@ -2506,7 +2506,7 @@ components: format: uuid issuerDID: type: string - recipientDID: + userDID: type: string paymentOptionID: type: string diff --git a/internal/api/api.gen.go b/internal/api/api.gen.go index 3df79c674..3d613184b 100644 --- a/internal/api/api.gen.go +++ b/internal/api/api.gen.go @@ -317,7 +317,7 @@ type CreatePaymentRequestResponse struct { IssuerDID string `json:"issuerDID"` PaymentOptionID openapi_types.UUID `json:"paymentOptionID"` Payments []PaymentRequestInfo `json:"payments"` - RecipientDID string `json:"recipientDID"` + UserDID string `json:"userDID"` } // Credential defines model for Credential. diff --git a/internal/api/payment_test.go b/internal/api/payment_test.go index ab3c8198f..d5315a5fc 100644 --- a/internal/api/payment_test.go +++ b/internal/api/payment_test.go @@ -635,7 +635,7 @@ func TestServer_CreatePaymentRequest(t *testing.T) { Data: protocol.PaymentRequestInfoData{}, }, }, - RecipientDID: receiverDID.String(), + UserDID: receiverDID.String(), }, }, }, @@ -658,7 +658,7 @@ func TestServer_CreatePaymentRequest(t *testing.T) { require.NoError(t, json.Unmarshal(rr.Body.Bytes(), &response)) assert.NotEqual(t, uuid.Nil, response.Id) assert.Equal(t, tc.expected.resp.IssuerDID, response.IssuerDID) - assert.Equal(t, tc.expected.resp.RecipientDID, response.RecipientDID) + assert.Equal(t, tc.expected.resp.UserDID, response.UserDID) assert.InDelta(t, time.Now().UnixMilli(), response.CreatedAt.UnixMilli(), 100) /* assert.Equal(t, len(tc.expected.resp.Payments), len(response.Payments)) diff --git a/internal/api/responses.go b/internal/api/responses.go index 5d5d89010..c5dcb63de 100644 --- a/internal/api/responses.go +++ b/internal/api/responses.go @@ -357,7 +357,7 @@ func toCreatePaymentRequestResponse(payReq *domain.PaymentRequest) CreatePayment CreatedAt: payReq.CreatedAt, Id: payReq.ID, IssuerDID: payReq.IssuerDID.String(), - RecipientDID: payReq.RecipientDID.String(), + UserDID: payReq.RecipientDID.String(), PaymentOptionID: payReq.PaymentOptionID, Payments: []PaymentRequestInfo{payment}, }