Package com.paypal.soap.api

Examples of com.paypal.soap.api.PaymentDetailsType


      DoExpressCheckoutPaymentRequestDetailsType detail = new DoExpressCheckoutPaymentRequestDetailsType();
      detail.setPayerID(payerId);
      detail.setToken(token);
      detail.setPaymentAction(PaymentActionCodeType.fromString("Sale"));
   
      PaymentDetailsType paymentDetail = new PaymentDetailsType();
      BasicAmountType orderTotal = new BasicAmountType();
      orderTotal.setCurrencyID(CurrencyCodeType.fromString(currencyCode));
      orderTotal.set_value(Format.getSimpleFloat(orderHeader.getOrderTotal()));
      paymentDetail.setOrderTotal(orderTotal);

      BasicAmountType priceTotal = new BasicAmountType();
      priceTotal.setCurrencyID(CurrencyCodeType.fromString(currencyCode));
      priceTotal.set_value(Format.getSimpleFloat(orderEngine.getOrderPriceTotal() - orderEngine.getOrderPriceDiscountTotal()));
      paymentDetail.setItemTotal(priceTotal);

      BasicAmountType taxTotal = new BasicAmountType();
      taxTotal.setCurrencyID(CurrencyCodeType.fromString(currencyCode));
      taxTotal.set_value(Format.getSimpleFloat(orderEngine.getOrderTaxTotal()));
      paymentDetail.setTaxTotal(taxTotal);

      float total = orderHeader.getShippingTotal() - orderHeader.getShippingDiscountTotal();
      BasicAmountType shippingTotal = new BasicAmountType();
      shippingTotal.setCurrencyID(CurrencyCodeType.fromString(currencyCode));
      shippingTotal.set_value(Format.getSimpleFloat(total));
      paymentDetail.setShippingTotal(shippingTotal);
/*
      Vector<PaymentDetailsItemType> paymentItems = new Vector<PaymentDetailsItemType>();
      Iterator<?> iterator = orderHeader.getOrderItemDetails().iterator();
      while (iterator.hasNext()) {
        OrderItemDetail orderItemDetail = (OrderItemDetail) iterator.next();
View Full Code Here

TOP

Related Classes of com.paypal.soap.api.PaymentDetailsType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.