Examples of MerchantCalculationCallback


Examples of com.globant.google.mendoza.malbec.schema._2.MerchantCalculationCallback

   * @return Returns the callbak calculate.
   */
  private Calculate getCallbackCalculate(
      final MendozaMerchantCalculation merchantCalculation) {
    log.trace("Entering getCallbackCalculate");
    MerchantCalculationCallback callback =
      merchantCalculation.getMerchantCalculationCallback();
    log.trace("Leaving getCallbackCalculate");
    return callback.getCalculate();
  }
View Full Code Here

Examples of com.globant.google.mendoza.malbec.schema._2.MerchantCalculationCallback

      log.debug("Merchant calculation result message: " + resultMsg);
      log.debug("The merchant calculation result message is not a valid XML: "
      + validationMessage);
    }

    MerchantCalculationCallback merchantCalculationCallback = null;
    MerchantCalculationResults merchantCalculationResult = null;
    try {
      /* Callback */
      JAXBElement callbackNode =
        (JAXBElement) CartUtils.unmarshal(callbackMsg);
View Full Code Here

Examples of com.google.checkout.MerchantCalculationCallback

      return;
    }
   
    try {
      // Authorization matches, grab the request
      MerchantCalculationCallback callback = (MerchantCalculationCallback) Unmarshaller.unmarshal(MerchantCalculationCallback.class, _request.getReader());
      MerchantCalculationResults results = HandlerFactory.getCalculationHandler().performCalculation(callback);
      _response.addHeader("Content-Type", "application/xml");
      _response.addHeader("Accepts", "application/xml");
      results.marshal(_response.getWriter());
      _response.setStatus(HttpStatus.SC_OK);
View Full Code Here

Examples of com.google.checkout.merchantcalculation.MerchantCalculationCallback

       
        try {
            MerchantCalculationCallbackProcessor cp = new MerchantCalculationCallbackProcessorImpl(
                    mc);
           
            MerchantCalculationCallback callback = new MerchantCalculationCallback(
                    notificationMsg);
           
            Iterator addresses = callback.getAnonymousAddresses().iterator();
            Iterator shippingMethods;
            Iterator merchantCodes;
           
            MerchantCalculationResults results = new MerchantCalculationResults();
            AnonymousAddress address;
            String shipping;
            MerchantCodeString code;
           
            while (addresses.hasNext()) {
                address = (AnonymousAddress) addresses.next();
               
                shippingMethods = callback.getShippingMethods().iterator();
                while (shippingMethods.hasNext()) {
                    shipping = (String) shippingMethods.next();
                   
                    merchantCodes = callback.getMerchantCodes().iterator();
                    Collection codeResults = new ArrayList();
                    while (merchantCodes.hasNext()) {
                        code = (MerchantCodeString) merchantCodes.next();
                        CouponResult coupon = new CouponResult(false, 0.0f,
                                mc.getCurrencyCode(),
View Full Code Here

Examples of com.google.checkout.merchantcalculation.MerchantCalculationCallback

      MerchantCalculationCallbackProcessor cp = new MerchantCalculationCallbackProcessorImpl(
          mc);

      InputStream in = request.getInputStream();
      MerchantCalculationCallback callback = new MerchantCalculationCallback(
          in);
      MerchantCalculationResults results = cp.process(callback);

      PrintWriter out = response.getWriter();
      out.print(results.getXml());
View Full Code Here

Examples of com.google.checkout.merchantcalculation.MerchantCalculationCallback

      MerchantCalculationCallbackProcessor cp = new SIMerchantCalculationCallbackProcessorImpl(
          mc);

      InputStream in = request.getInputStream();
      MerchantCalculationCallback callback = new MerchantCalculationCallback(
          in);
      MerchantCalculationResults results = cp.process(callback);

      PrintWriter out = response.getWriter();
      out.print(results.getXml());
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.