.print(Money.of(currencyUnit, order.getGrandTotal(), RoundingMode.HALF_EVEN)); String itemsTotal = formatter.withLocale(locale) .print(Money.of(currencyUnit, order.getItemsTotal(), RoundingMode.HALF_EVEN));
.print(Money.of(currencyUnit, order.getGrandTotal(), RoundingMode.HALF_EVEN)); String itemsTotal = formatter.withLocale(locale) .print(Money.of(currencyUnit, order.getItemsTotal(), RoundingMode.HALF_EVEN));
GatewayResponse gatewayResponse = gateway.purchase(order.getGrandTotal(), data);
public OrderRepresentation(DateTimeZone tenantZone, Order order) { this.slug = order.getSlug(); if (order.getCreationDate() != null) { this.creationDate = new DateTime(order.getCreationDate().getTime(), tenantZone); } if (order.getUpdateDate() != null) { this.updateDate = new DateTime(order.getUpdateDate().getTime(), tenantZone); } this.currency = order.getCurrency(); this.numberOfItems = order.getNumberOfItems(); this.itemsTotal = order.getItemsTotal(); this.shipping = order.getShipping(); this.grandTotal = order.getGrandTotal(); this.status = order.getStatus(); this.additionalInformation = order.getAdditionalInformation(); this.data = order.getOrderData(); if (order.getBillingAddress() != null) { this.setBillingAddress(new AddressRepresentation(order.getBillingAddress())); } if (order.getDeliveryAddress() != null) { this.setDeliveryAddress(new AddressRepresentation(order.getDeliveryAddress())); } if (order.getCustomer() != null) { this.setCustomer(new CustomerRepresentation(order.getCustomer())); } }