Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
Hi Todd
See code sample below, I hope it helps.
// Get Order reference
var orderReference = _orderRepository.SaveAsPurchaseOrder(cart);
// Load purchase order
IPurchaseOrder purchaseOrder = _orderRepository.Load<IPurchaseOrder>(orderReference.OrderGroupId);
// loop through all payments in the PurchaseOrder, find payment with id equal guidPaymentMethodId, set TransactionId
foreach (var payment in purchaseOrder.Forms.SelectMany(form => form.Payments).Where(payment => payment.PaymentMethodId.Equals(paymentMethodId)))
{
payment.TransactionID = token;
payment.ProviderTransactionID = token;
}
Is there a way to update any meta field on a payment record for an order that has already created a purchase order object?
Thanks