Compare commits
No commits in common. "354bdb65568468eea95822801b3896ed1dfcb12b" and "034181c702d947e9e7bfabefd2b53fec12e154a3" have entirely different histories.
354bdb6556
...
034181c702
|
|
@ -1,5 +1,4 @@
|
|||
using AyCode.Core.Extensions;
|
||||
using Nop.Core;
|
||||
using Nop.Core;
|
||||
using Nop.Core.Caching;
|
||||
using Nop.Core.Domain.Catalog;
|
||||
using Nop.Core.Domain.Customers;
|
||||
|
|
@ -191,18 +190,18 @@ public class AuctionService : IAuctionService
|
|||
|
||||
try
|
||||
{
|
||||
var processPaymentRequest = new ProcessPaymentRequest
|
||||
{
|
||||
CustomerId = auctionItem.WinnerCustomerId,
|
||||
OrderTotal = auctionItem.CurrentPrice,
|
||||
OrderGuid = auctionItem.OrderGuid.IsNullOrEmpty() ? Guid.NewGuid() : auctionItem.OrderGuid.Value
|
||||
};
|
||||
|
||||
var processPaymentRequest = new ProcessPaymentRequest();
|
||||
processPaymentRequest.CustomerId = auctionItem.WinnerCustomerId;
|
||||
processPaymentRequest.CustomValues.Add("ProductToAuctionMappingId", auctionItem.Id);
|
||||
processPaymentRequest.OrderTotal = auctionItem.CurrentPrice;
|
||||
|
||||
//processPaymentRequest.OrderGuid = productToAuction.OrderGuid; //TODO: - J.
|
||||
processPaymentRequest.OrderGuid = Guid.NewGuid();
|
||||
|
||||
var placeOrderResult = await _orderProcessingService.PlaceOrderAsync(processPaymentRequest);
|
||||
|
||||
if (!placeOrderResult.Success) return null;
|
||||
|
||||
if (placeOrderResult.Success)
|
||||
{
|
||||
//placeOrderResult.PlacedOrder //TODO:... - J.
|
||||
|
||||
auctionItem.OrderId = placeOrderResult.PlacedOrder.Id;
|
||||
|
|
@ -210,6 +209,10 @@ public class AuctionService : IAuctionService
|
|||
|
||||
return placeOrderResult;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error($"AuctionService.CreateOrderForWinnerAsync(); Exception; auctionItemId: {auctionItem.Id}", ex);
|
||||
|
|
|
|||
Loading…
Reference in New Issue