Examples of TxnResult


Examples of com.jada.xml.paymentexpress.TxnResult

    String url = SERVICE_URL_SANDBOX;
    if (isProduction()) {
      url = SERVICE_URL_PRODUCTION;
    }
      TxnResult result = null;
    try {
      result = callWebService(url, order);
    }
    catch (Exception e) {
      logger.error(e);;
      throw new PaymentException(e.getMessage());
    }
    String approved = result.getResponseText();
    if (!approved.equals(RESULT_APPROVED)) {
      paymentMessage = result.getReCo() + ": " + approved;
      throw new AuthorizationException(paymentMessage);
    }
    if (result.getTransaction() != null) authCode = result.getTransaction()[0].getAuthCode();
    paymentReference1 = result.getDpsTxnRef();
    paymentReference2 = result.getTxnRef();   
    paymentType = PAYMENT_TYPE;
   
    return;
  }
View Full Code Here

Examples of com.jada.xml.paymentexpress.TxnResult

    String url = SERVICE_URL_SANDBOX;
    if (isProduction()) {
      url = SERVICE_URL_PRODUCTION;
    }
      TxnResult result = null;
    try {
      result = callWebService(url, order);
    }
    catch (Exception e) {
      logger.error(e);;
      throw new PaymentException(e.getMessage());
    }
    String approved = result.getResponseText();
    if (!approved.equals(RESULT_APPROVED)) {
      paymentMessage = result.getReCo() + ": " + approved;
      throw new AuthorizationException(paymentMessage);
    }
    if (result.getTransaction() != null) authCode = result.getTransaction()[0].getAuthCode();
    paymentReference1 = result.getDpsTxnRef();
    paymentReference2 = result.getTxnRef();   
    paymentType = PAYMENT_TYPE;
  }
View Full Code Here

Examples of com.jada.xml.paymentexpress.TxnResult

      }
    String responseXml = Utility.callWebService(url, txnRequestXml);
      if (ApplicationGlobal.isLocalTesting()) {
        logger.debug("receive > " + responseXml);
      }
    TxnResult result = unmarshall(responseXml);
    return result;
  }
View Full Code Here

Examples of com.jada.xml.paymentexpress.TxnResult

      Unmarshaller unmarshaller = xmlContext.createUnmarshaller();
      unmarshaller.setClass(TxnResult.class);
     
      StringReader stream = new StringReader(response);
      BufferedReader reader = new BufferedReader(stream);
      TxnResult result = (TxnResult) unmarshaller.unmarshal(reader);
      return result;
  }
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.