Package com.mes.sdk.gateway

Examples of com.mes.sdk.gateway.GatewayResponse


          .setCcNum("4012888812348882")
      )
      .amount("0.3")
      .setParameter("client_reference_number", "Java SDK Test");
     
      GatewayResponse cResponse = gateway.run(cRequest);
      LOG.log(Level.INFO, cResponse.toString());
    } catch (MesRuntimeException e) {
      e.printStackTrace();
    }
   
  }
View Full Code Here


            .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());
    } catch (MesRuntimeException e) {
      e.printStackTrace();
    }
   
  }
View Full Code Here

      .requesterName("D. Vader")
      .cardholderReferenceNumber("123456")
      .shipToZip("55555")
      .vatAmount("0.00");

      GatewayResponse sResponse = gateway.run(sRequest);
      LOG.log(Level.INFO, sResponse.toString());
    } catch (MesRuntimeException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

        .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")
        )
        .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());
    } catch (MesRuntimeException e) {
      e.printStackTrace();
    }
   
  }
View Full Code Here

              .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());
      }
     
    } catch (MesRuntimeException e) {
      e.printStackTrace();
    }
View Full Code Here

            .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());
      }
     
    } catch (MesRuntimeException e) {
      e.printStackTrace();
    } catch (InterruptedException e) {
View Full Code Here

        .destCountryCode("840")
        .vatInvoice("123456")
        .orderDate("130624")
        .vatAmount("0.00");
       
      GatewayResponse sResponse = gateway.run(sRequest);
      LOG.log(Level.INFO, sResponse.toString());
    } catch (MesRuntimeException e) {
      e.printStackTrace();
    }
   
  }
View Full Code Here

          )
        .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());
      }
     
    } catch (MesRuntimeException e) {
      e.printStackTrace();
    }
View Full Code Here

        .destCountryCode("840")
        .orderDate("130624")
        .altTaxAmount("0.00")
        .altTaxAmountIndicator("N");

      GatewayResponse sResponse = gateway.run(sRequest);
      LOG.log(Level.INFO, sResponse.toString());
    } catch (MesRuntimeException e) {
      e.printStackTrace();
    }
   
  }
View Full Code Here

            .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());
    } catch (MesRuntimeException e) {
      e.printStackTrace();
    }
   
  }
View Full Code Here

TOP

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

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.