Skip to content

Commit

Permalink
#77 paypal integration: display only the final cost instead of each i…
Browse files Browse the repository at this point in the history
…tems
  • Loading branch information
syjer committed Jul 28, 2016
1 parent e35f7fa commit bcc25c8
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/main/java/alfio/manager/PaypalManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,9 @@ private List<Transaction> buildPaymentDetails(Event event, OrderSummary orderSum
String description = messageSource.getMessage("reservation-email-subject", new Object[] {configurationManager.getShortReservationID(event, reservationId), event.getDisplayName()}, locale);
transaction.setDescription(description).setAmount(amount);

List<Item> items = orderSummary.getSummary().stream()
.map(summaryRow -> fromSummaryRow(summaryRow, event))
.collect(Collectors.toList());

if(!event.isVatIncluded()) {
String vatMsg = messageSource.getMessage("reservation-page.vat", new Object[] {event.getVat()}, locale);
items.add(new Item(vatMsg, "1", orderSummary.getTotalVAT(), event.getCurrency()));
}

List<Item> items = new ArrayList<>();
items.add(new Item(description, "1", orderSummary.getTotalPrice(), event.getCurrency()));
transaction.setItemList(new ItemList().setItems(items));

List<Transaction> transactions = new ArrayList<>();
Expand Down

0 comments on commit bcc25c8

Please sign in to comment.