Browse Source

Pass generated id to PaymentRequestProducts

pull/48/head
enisn 5 years ago
parent
commit
10e9770bb1
  1. 1
      services/payment/src/EShopOnAbp.PaymentService.Application/PaymentRequests/PaymentRequestAppService.cs
  2. 2
      services/payment/src/EShopOnAbp.PaymentService.Domain/PaymentRequests/PaymentRequestProduct.cs

1
services/payment/src/EShopOnAbp.PaymentService.Application/PaymentRequests/PaymentRequestAppService.cs

@ -28,6 +28,7 @@ namespace EShopOnAbp.PaymentService.PaymentRequests
foreach (var paymentRequestProduct in input.Products
.Select(s => new PaymentRequestProduct(
GuidGenerator.Create(),
paymentRequest.Id,
s.Name,
s.UnitPrice,

2
services/payment/src/EShopOnAbp.PaymentService.Domain/PaymentRequests/PaymentRequestProduct.cs

@ -19,6 +19,7 @@ namespace EShopOnAbp.PaymentService.PaymentRequests
public decimal TotalPrice { get; set; }
public PaymentRequestProduct(
Guid id,
Guid paymentRequestId,
[NotNull] string name,
decimal unitPrice,
@ -26,6 +27,7 @@ namespace EShopOnAbp.PaymentService.PaymentRequests
decimal totalPrice,
[CanBeNull] string referenceId = null)
{
Id = id;
PaymentRequestId = paymentRequestId;
Name = name;
UnitPrice = unitPrice;

Loading…
Cancel
Save