Package com.paypal.soap.api

Examples of com.paypal.soap.api.BasicAmountType


    CallerServices caller = new CallerServices();
      caller.setAPIProfile(createProfile());
   
    SetExpressCheckoutRequestType requestHeader = new SetExpressCheckoutRequestType();
    SetExpressCheckoutRequestDetailsType requestDetail = new SetExpressCheckoutRequestDetailsType();
    BasicAmountType ppAmount = new BasicAmountType();
    ppAmount.setCurrencyID(CurrencyCodeType.fromString(orderHeader.getSiteCurrency().getSiteCurrencyClass().getCurrency().getCurrencyCode()));
    float verificationTotal = orderHeader.getOrderTotal() * (extraVerificationPercent + 100) / 100 + extraVerificationAmount;
    ppAmount.set_value(Format.getSimpleFloat(verificationTotal));
    requestDetail.setOrderTotal(ppAmount);
    requestDetail.setPaymentAction(PaymentActionCodeType.fromString("Authorization"));

    ContentBean contentBean = ContentLookupDispatchAction.getContentBean(request);
    requestDetail.setReturnURL(Utility.getSecureURLPrefix(siteDomain) +
View Full Code Here


      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()) {
View Full Code Here

TOP

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

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.