// Add the new transactions to this payment (failed and confirmed) These need to be saved on the order payment
// regardless of an error in the workflow later.
for (OrderPayment payment : order.getPayments()) {
if (additionalTransactions.containsKey(payment)) {
PaymentTransactionType confirmedType = null;
if (additionalConfirmedTransactions.containsKey(payment)) {
confirmedType = additionalConfirmedTransactions.get(payment);
}
payment.addTransaction(additionalTransactions.get(payment));