Examples of TxnRequest


Examples of com.jada.xml.paymentexpress.TxnRequest

  }

  private TxnRequest formatOrder(OrderHeader orderHeader) {
    CreditCardInfo creditCardInfo = this.getCreditCardInfo();
   
    TxnRequest order = new TxnRequest();
    order.setPostUsername(postUsername);
    order.setPostPassword(postPassword);   
    order.setInputCurrency(orderHeader.getSiteCurrency().getSiteCurrencyClass().getSiteCurrencyClassName());
//    order.setTxnId(orderHeader.getOrderNum());
    order.setTxnId(orderHeader.getOrderHeaderId().toString());   
    OrderAddress orderAddress = orderHeader.getCustAddress();
    if (orderHeader.getBillingAddress().getCustUseAddress().equals(Constants.CUST_ADDRESS_USE_OWN)) {
      orderAddress = orderHeader.getBillingAddress();
    }
    order.setCardHolderName(orderAddress.getCustFirstName() + " " + orderAddress.getCustLastName());
//    order.setAmount(Format.getSimpleFloat(orderEngine.getOrderPriceTotal()));
    order.setAmount(Format.getSimpleFloat(orderHeader.getOrderTotal()));
    order.setCardNumber(creditCardInfo.getCreditCardNum());
    String expiryMonth = (creditCardInfo.getCreditCardExpiryMonth());
    String expiryYear = (creditCardInfo.getCreditCardExpiryYear());
    if (expiryYear.length() > 2) {
      expiryYear = expiryYear.substring(2);
    }
    order.setDateExpiry(expiryMonth + expiryYear);
    if (creditCardInfo.getCreditCardVerNum() != null) {
      order.setCvc2(creditCardInfo.getCreditCardVerNum());
    }
    return order;
  }
View Full Code Here

Examples of com.jada.xml.paymentexpress.TxnRequest

    throw new NotImplementedException("");
  }

  public void authorizeAndCapturePayment(InvoiceHeader invoiceHeader, HttpServletRequest request) throws PaymentException, Exception {
    OrderHeader orderHeader = invoiceHeader.getOrderHeader();
    TxnRequest order = formatOrder(orderHeader);
    order.setTxnType(CARDACTION_SALE);

    String url = SERVICE_URL_SANDBOX;
    if (isProduction()) {
      url = SERVICE_URL_PRODUCTION;
    }
View Full Code Here

Examples of com.jada.xml.paymentexpress.TxnRequest

  }

  public void creditPayment(CreditHeader creditHeader) throws AuthorizationException, PaymentException, Exception {
    OrderHeader orderHeader = creditHeader.getOrderHeader();

    TxnRequest order = new TxnRequest();
    order.setPostUsername(postUsername);
    order.setPostPassword(postPassword)
    order.setInputCurrency(orderHeader.getSiteCurrency().getSiteCurrencyClass().getSiteCurrencyClassName());
    order.setAmount(Format.getSimpleFloat(creditHeader.getCreditTotal()));

    PaymentTran payment = orderHeader.getPaymentTran();
    if (payment == null) {
      for (InvoiceHeader invoiceHeader : orderHeader.getInvoiceHeaders()) {
        payment = invoiceHeader.getPaymentTran();
      }
    }
    order.setDpsTxnRef(payment.getPaymentReference1());
    order.setTxnId(payment.getPaymentReference2());
    order.setTxnType(CARDACTION_CREDIT);

    String url = SERVICE_URL_SANDBOX;
    if (isProduction()) {
      url = SERVICE_URL_PRODUCTION;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.