Skip to content

Commit

Permalink
Merge pull request #349 from joshgk00/issue/issue-345
Browse files Browse the repository at this point in the history
Fixes Transaction.Items is null first time ProcessTransaction is called
  • Loading branch information
Will Strohl authored Feb 23, 2021
2 parents f166643 + f00ccd5 commit afdac96
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@ private bool ProcessTransaction(OrderTaskContext context, OrderTransaction p)
try
{
var payManager = new OrderPaymentManager(context.Order, context.HccApp);
var orderNumber = !string.IsNullOrEmpty(p.OrderNumber) ? p.OrderNumber : context.Order.OrderNumber;
Transaction t = payManager.CreateEmptyTransaction();
t.Card = p.CreditCard;
t.Card.SecurityCode = context.Inputs.GetProperty("hcc", "CardSecurityCode");
t.Amount = p.Amount;
t.Items = GetLineItemsForTransaction(context, p.OrderNumber);
t.Items = GetLineItemsForTransaction(context, orderNumber);

if (context.HccApp.CurrentStore.Settings.PaymentCreditCardAuthorizeOnly)
{
Expand Down

0 comments on commit afdac96

Please sign in to comment.