Package com.mes.sdk.gateway

Examples of com.mes.sdk.gateway.GatewayRequest


      .validateRequests(true);
   
    gateway = new Gateway(settings);
   
    try {
      GatewayRequest cRequest = new GatewayRequest(TransactionType.CREDIT)
      .cardData(
        new CcData()
          .setCcNum("4012888812348882")
      )
      .amount("0.3")
View Full Code Here


      .verbose(true);
   
    gateway = new Gateway(settings);
   
    try {
      GatewayRequest sRequest = new GatewayRequest(TransactionType.SALE)
        .cardData(
          new CcData()
            .setCcNum("4012888812348882")
            .setExpDate("12/12")
            .setCvv("123")
View Full Code Here

    .verbose(true);

    gateway = new Gateway(settings);

    try {
      GatewayRequest sRequest = new GatewayRequest(TransactionType.SALE)
      .cardData(
          new CcData()
            .setCcNum("349999999999991")
            .setExpDate("12/16")
            .setCvv("1234")
View Full Code Here

      .verbose(true);
   
    gateway = new Gateway(settings);
   
    try {
      GatewayRequest tRequest = new GatewayRequest(TransactionType.TOKENIZE)
        .cardData(
          new CcData()
            .setCcNum("4012888812348882")
        )
        .setParameter("client_reference_number", "Java SDK Test");
      GatewayResponse tResponse = gateway.run(tRequest);
      LOG.log(Level.INFO, tResponse.toString());
     
      GatewayRequest sRequest = new GatewayRequest(TransactionType.PREAUTH)
        .cardData(
          new CcData()
            .setToken(tResponse.getTransactionId())
            .setExpDate("1216")
            .setCvv("123")
View Full Code Here

      .verbose(true);
   
    gateway = new Gateway(settings);
   
    try {
      GatewayRequest sRequest = new GatewayRequest(TransactionType.SALE)
        .cardData(
            new CcData()
              .setCcNum("4012888812348882")
              .setExpDate("12/12")
              .setCvv("123")
          )
        .amount("0.3")
        .setParameter("invoice_number", "123456")
        .setParameter("client_reference_number", "Java SDK Test");
      GatewayResponse sResponse = gateway.run(sRequest);
      LOG.log(Level.INFO, sResponse.toString());
     
      if(sResponse.isApproved()) {
        GatewayRequest rRequest = new GatewayRequest(TransactionType.VOID);
        rRequest.setParameter("transaction_id", sResponse.getResponseValue("transaction_id"));
       
        GatewayResponse rResponse = gateway.run(rRequest);
        LOG.log(Level.INFO, rResponse.toString());
      }
     
View Full Code Here

      .verbose(true);
   
    gateway = new Gateway(settings);
   
    try {
      GatewayRequest pRequest = new GatewayRequest(TransactionType.PREAUTH)
        .cardData(
          new CcData()
            .setCcNum("4012888812348882")
            .setExpDate("12/12")
            .setCvv("123")
        )
        .amount("0.3")
        .setParameter("invoice_number", "123456")
        .setParameter("client_reference_number", "Java SDK Test");
      GatewayResponse pResponse = gateway.run(pRequest);
      LOG.log(Level.INFO, pResponse.toString());
     
      // If capturing in under 15 seconds, use Sale. Otherwise, the result may be "Invalid transaction ID"
      LOG.log(Level.INFO, "Pausing for 15.0 seconds...");
      Thread.sleep(15000);
     
      if(pResponse.isApproved()) {
        GatewayRequest sRequest = new GatewayRequest(TransactionType.SETTLE)
          .setParameter("transaction_id", pResponse.getResponseValue("transaction_id"))
          .amount("0.03");
       
        GatewayResponse sResponse = gateway.run(sRequest);
        LOG.log(Level.INFO, sResponse.toString());
View Full Code Here

      .verbose(true);
   
    gateway = new Gateway(settings);
   
    try {
      GatewayRequest sRequest = new GatewayRequest(TransactionType.SALE)
        .cardData(
          new CcData()
            .setCcNum("4012888812348882")
            .setExpDate("12/16")
            .setCvv("123")
View Full Code Here

      .verbose(true);
   
    gateway = new Gateway(settings);
   
    try {
      GatewayRequest sRequest = new GatewayRequest(TransactionType.SALE)
        .cardData(
            new CcData()
              .setCcNum("4012888812348882")
              .setExpDate("12/12")
              .setCvv("123")
          )
        .amount("0.03")
        .setParameter("invoice_number", "123456")
        .setParameter("client_reference_number", "Java SDK Test");
     
      GatewayResponse sResponse = gateway.run(sRequest);
      LOG.log(Level.INFO, sResponse.toString());
     
      if(sResponse.isApproved()) {
        GatewayRequest rRequest = new GatewayRequest(TransactionType.REFUND);
        rRequest.setParameter("transaction_id", sResponse.getResponseValue("transaction_id"))
          .amount("0.03");
        GatewayResponse rResponse = gateway.run(rRequest);
        LOG.log(Level.INFO, rResponse.toString());
      }
     
View Full Code Here

      .verbose(true);
   
    gateway = new Gateway(settings);
   
    try {
      GatewayRequest sRequest = new GatewayRequest(TransactionType.SALE)
        .cardData(
          new CcData()
            .setCcNum("5133272000000004")
            .setExpDate("12/16")
            .setCvv("123")
View Full Code Here

      .verbose(true);
   
    gateway = new Gateway(settings);
   
    try {
      GatewayRequest sRequest = new GatewayRequest(TransactionType.SALE)
        .cardData(
          new CcData()
            .setCcNum("4012888812348882")
            .setExpDate("12/12")
            .setCvv("123")
View Full Code Here

TOP

Related Classes of com.mes.sdk.gateway.GatewayRequest

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.