Examples of GatewayResponse


Examples of com.eway.GatewayResponse

      gwr.setCustomerLastName(billingAddress.getCustLastName());
      gwr.setCustomerPostcode(billingAddress.getCustZipCode());
      gwr.setCVN(creditCardInfo.getCreditCardVerNum());
      gwr.setTotalAmount((int) (orderHeader.getOrderTotal() * 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

Examples of com.eway.GatewayResponse

      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

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

Examples of com.mes.sdk.gateway.GatewayResponse

            .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

Examples of com.mes.sdk.gateway.GatewayResponse

      .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

Examples of com.mes.sdk.gateway.GatewayResponse

        .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

Examples of com.mes.sdk.gateway.GatewayResponse

              .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

Examples of com.mes.sdk.gateway.GatewayResponse

            .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

Examples of com.mes.sdk.gateway.GatewayResponse

        .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

Examples of com.mes.sdk.gateway.GatewayResponse

          )
        .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
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.