Package com.jada.order.payment

Examples of com.jada.order.payment.AuthorizationException


      throw new PaymentException(e.getMessage());
    }
    String approved = result.getApproved();
    if (!approved.equals(RESULT_APPROVED)) {
      paymentMessage = result.getErrMsg();
      throw new AuthorizationException(approved + " " + result.getErrMsg());
    }
    String transactionId = result.getReturnCode();
    String ids[] = transactionId.split(":");
    authCode = ids[1];
    paymentReference1 = transactionId;
View Full Code Here


      throw new PaymentException(e.getMessage());
    }
    String approved = result.getApproved();
    if (!approved.equals(RESULT_APPROVED)) {
      paymentMessage = result.getErrMsg();
      throw new AuthorizationException(approved + " - " + result.getErrMsg());
    }
    String transactionId = result.getReturnCode();
    String ids[] = transactionId.split(":");
    authCode = ids[1];
    paymentReference1 = transactionId;
View Full Code Here

      throw new PaymentException(e.getMessage());
    }
    String approved = result.getApproved();
    if (!approved.equals(RESULT_APPROVED)) {
      paymentMessage = result.getErrMsg();
      throw new AuthorizationException(approved + " - " + result.getErrMsg());
    }
    String transactionId = result.getReturnCode();
    String ids[] = transactionId.split(":");
    authCode = ids[1];
    paymentReference1 = transactionId;
View Full Code Here

      throw new PaymentException(e.getMessage());
    }
    String approved = result.getApproved();
    if (!approved.equals(RESULT_APPROVED)) {
      paymentMessage = result.getErrMsg();
      throw new AuthorizationException(approved + " - " + result.getErrMsg());
    }
    String transactionId = result.getReturnCode();
    String ids[] = transactionId.split(":");
    authCode = ids[1];
    paymentReference1 = transactionId;
View Full Code Here

   
    NVPResponseParser parser = new NVPResponseParser(response);
    String ack = parser.getValue("ACK");
    if (!ack.equals("Success")) {
      paymentMessage = parser.getValue("L_ERRORCODE0") + ": " + parser.getValue("L_SHORTMESSAGE0") + " - " + parser.getValue("L_LONGMESSAGE0");
      throw new AuthorizationException(paymentMessage);
    }
   
    authCode = parser.getValue("TRANSACTIONID");
    paymentReference1 = parser.getValue("CORRELATIONID");
//    paymentReference2 = "Fee: " + parser.getValue("FEEAMT");
View Full Code Here

   
    NVPResponseParser parser = new NVPResponseParser(response);
    String ack = parser.getValue("ACK");
    if (!ack.equals("Success")) {
      paymentMessage = parser.getValue("L_ERRORCODE0") + ": " + parser.getValue("L_SHORTMESSAGE0") + " - " + parser.getValue("L_LONGMESSAGE0");
      throw new AuthorizationException(paymentMessage);
    }
   
    authCode = "";
    paymentReference1 = parser.getValue("CORRELATIONID");
  }
View Full Code Here

   
    NVPResponseParser parser = new NVPResponseParser(response);
    String ack = parser.getValue("ACK");
    if (!ack.equals("Success")) {
      paymentMessage = parser.getValue("L_ERRORCODE0") + ": " + parser.getValue("L_SHORTMESSAGE0") + " - " + parser.getValue("L_LONGMESSAGE0");
      throw new AuthorizationException(paymentMessage);
    }
   
    authCode = parser.getValue("TRANSACTIONID");
    paymentReference1 = parser.getValue("CORRELATIONID");
    paymentReference2 = "Fee: " + parser.getValue("FEEAMT");
View Full Code Here

   
    NVPResponseParser parser = new NVPResponseParser(response);
    String ack = parser.getValue("ACK");
    if (!ack.equals("Success")) {
      paymentMessage = parser.getValue("L_ERRORCODE0") + ": " + parser.getValue("L_SHORTMESSAGE0") + " - " + parser.getValue("L_LONGMESSAGE0");
      throw new AuthorizationException(paymentMessage);
    }
   
    authCode = parser.getValue("REFUNDTRANSACTIONID");
    paymentReference1 = parser.getValue("CORRELATIONID");
    paymentReference2 = "Refund fee: " + parser.getValue("FEEREFUNDAMT");
View Full Code Here

      GatewayResponse response = connector.sendRequest(gwr);
    if (!response.getTrxnStatus()) {
      logger.error("request = Not able to process credit card authorization for " + orderHeader.getCustAddress().getCustFirstName() + " " + orderHeader.getCustAddress().getCustLastName());
      logger.error("response = " + response.getTrxnError());
      paymentMessage = response.getTrxnError();
      throw new AuthorizationException(response.getTrxnError());
    }
    authCode = response.getAuthCode();
    paymentReference1 = response.getTrxnNumber();
    paymentReference2 = response.getTrxnReference();
  }
View Full Code Here

        custCreditCard = (CustomerCreditCard) iterator.next();
        break;
      }
      if (custCreditCard == null) {
        paymentMessage = "Unable to locate customer credit card to refund";
        throw new AuthorizationException("Unable to locate customer credit card to refund");
      }

      gwr.setCardExpiryMonth(custCreditCard.getCustCreditCardExpiryMonth());
      gwr.setCardExpiryYear(custCreditCard.getCustCreditCardExpiryYear());
      gwr.setCardHoldersName(custCreditCard.getCustCreditCardNum());
      gwr.setCardNumber(AESEncoder.getInstance().decode(custCreditCard.getCustCreditCardNum()));
      gwr.setCustomerInvoiceRef(orderHeader.getOrderNum());
     
      PaymentTran payment = orderHeader.getPaymentTran();
    if (payment == null) {
      for (InvoiceHeader invoiceHeader : orderHeader.getInvoiceHeaders()) {
        payment = invoiceHeader.getPaymentTran();
      }
    }
      gwr.setTrxnNumber(payment.getPaymentReference1());

      gwr.setCVN(custCreditCard.getCustCreditCardVerNum());
      gwr.setTotalAmount((int)(creditHeader.getCreditTotal() * 100));
      //gwr.setTotalAmount(1000);
   
      GatewayResponse response = connector.sendRequest(gwr);
    if (!response.getTrxnStatus()) {
      logger.error("request = Not able to process credit card authorization for " + orderHeader.getCustAddress().getCustFirstName() + " " + orderHeader.getCustAddress().getCustLastName());
      logger.error("response = " + response.getTrxnError());
      paymentMessage = response.getTrxnError();
      throw new AuthorizationException(response.getTrxnError());
    }
    authCode = response.getAuthCode();
    paymentReference1 = response.getTrxnNumber();
    paymentReference2 = response.getTrxnReference();
  }
View Full Code Here

TOP

Related Classes of com.jada.order.payment.AuthorizationException

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.