use of org.olat.resource.accesscontrol.model.PSPTransaction in project openolat by klemens.
the class PaypalAccessHandler method getPSPTransactions.
@Override
public List<PSPTransaction> getPSPTransactions(List<Order> orders) {
PaypalManager paypalManager = CoreSpringFactory.getImpl(PaypalManager.class);
List<PSPTransaction> transactions = paypalManager.loadTransactions(orders);
return transactions;
}
use of org.olat.resource.accesscontrol.model.PSPTransaction in project openolat by klemens.
the class PaypalManagerImpl method loadTransactions.
@Override
public List<PSPTransaction> loadTransactions(List<Order> orders) {
if (orders == null || orders.isEmpty())
return Collections.emptyList();
StringBuilder sb = new StringBuilder();
sb.append("select trx from ").append(PaypalTransaction.class.getName()).append(" as trx where ");
sb.append("trx.orderId in (:orderIds)");
List<Long> orderIds = new ArrayList<Long>(orders.size());
for (Order order : orders) {
orderIds.add(order.getKey());
}
List<PSPTransaction> transactions = dbInstance.getCurrentEntityManager().createQuery(sb.toString(), PSPTransaction.class).setParameter("orderIds", orderIds).getResultList();
return transactions;
}
use of org.olat.resource.accesscontrol.model.PSPTransaction in project OpenOLAT by OpenOLAT.
the class PaypalAccessHandler method getPSPTransactions.
@Override
public List<PSPTransaction> getPSPTransactions(List<Order> orders) {
PaypalManager paypalManager = CoreSpringFactory.getImpl(PaypalManager.class);
List<PSPTransaction> transactions = paypalManager.loadTransactions(orders);
return transactions;
}
use of org.olat.resource.accesscontrol.model.PSPTransaction in project OpenOLAT by OpenOLAT.
the class PaypalManagerImpl method loadTransactions.
@Override
public List<PSPTransaction> loadTransactions(List<Order> orders) {
if (orders == null || orders.isEmpty())
return Collections.emptyList();
StringBuilder sb = new StringBuilder();
sb.append("select trx from ").append(PaypalTransaction.class.getName()).append(" as trx where ");
sb.append("trx.orderId in (:orderIds)");
List<Long> orderIds = new ArrayList<Long>(orders.size());
for (Order order : orders) {
orderIds.add(order.getKey());
}
List<PSPTransaction> transactions = dbInstance.getCurrentEntityManager().createQuery(sb.toString(), PSPTransaction.class).setParameter("orderIds", orderIds).getResultList();
return transactions;
}
Aggregations