Examples of NewOrderNotification


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

  /** Sets the notifications that belongs to a specific order number.
   */
  private void updateNotifications() {
    log.trace("Entering setNotifications");
    NewOrderNotification non =
      proxyMessages.getNewOrderNotification(serverState.getGoogleOrderNumber());
    if (non != null) {
      setNewOrderNotification(non);
    }
    RiskInformationNotification risk =
View Full Code Here

Examples of com.google.checkout.NewOrderNotification

      output.output(_message, writer);
      String xml = writer.toString();
      if (LOG.isDebugEnabled()) {
        LOG.debug("New Order Notification received: [" + xml + "]");
      }
      NewOrderNotification notification = (NewOrderNotification) Unmarshaller.unmarshal(NewOrderNotification.class, new StringReader(writer.toString()));
      handleNotification(notification);
    } catch (MarshalException e) {
      throw new HandlerException("Error marshalling XML: " + e.getLocalizedMessage(), e);
    } catch (ValidationException e) {
      throw new HandlerException("Error validating XML: " + e.getLocalizedMessage(), e);
View Full Code Here

Examples of com.google.checkout.notification.NewOrderNotification

    AbstractNotificationProcessor implements MessageHandler {
 
  public String process(MerchantConstants mc, String notificationMsg)
  throws CheckoutException {
    try {
      NewOrderNotification notification =
          new NewOrderNotification(notificationMsg);
      String ack = getAckString();
      GoogleOrder order = GoogleOrder.findOrCreate(mc.getMerchantId(),
          notification.getGoogleOrderNo());
     
      order.setLastFulStatus(notification.getFulfillmentOrderState()
      .toString());
      order.setLastFinStatus(notification.getFinancialOrderState()
      .toString());
      order.setBuyerEmail(notification.getBuyerBillingAddress()
      .getEmail());
      order.setOrderAmount("" + notification.getOrderTotal());
      order.addIncomingMessage(notification.getTimestamp(), notification
          .getRootNodeName(), notification.getXmlPretty(), ack);
      return ack;
    } catch (Exception e) {
      throw new CheckoutException(e);
    }
  }
View Full Code Here

Examples of com.google.checkout.notification.NewOrderNotification

    MerchantConstants mc = MerchantConstantsFactory.getMerchantConstants();

    if (notificationString.indexOf("new-order-notification") > -1) {
      NewOrderNotificationProcessor processor = new NewOrderNotificationProcessorImpl(
          mc);
      NewOrderNotification notification = new NewOrderNotification(
          notificationString);
      return processor.process(notification);
    }
    if (notificationString.indexOf("risk-information-notification") > -1) {
      RiskInformationNotificationProcessor processor = new RiskInformationNotificationProcessorImpl(
View Full Code Here

Examples of com.google.checkout.notification.NewOrderNotification

    MerchantConstants mc = MerchantConstantsFactory.getMerchantConstants();

    if (notificationString.indexOf("new-order-notification") > -1) {
      NewOrderNotificationProcessor processor = new NewOrderNotificationProcessorImpl(
          mc);
      NewOrderNotification notification = new NewOrderNotification(
          notificationString);
      return processor.process(notification);
    }
    if (notificationString.indexOf("risk-information-notification") > -1) {
      RiskInformationNotificationProcessor processor = new RiskInformationNotificationProcessorImpl(
View Full Code Here

Examples of com.google.checkout.notification.NewOrderNotification

        // check the document type and process
        if (document != null) {
            String nodeValue = document.getDocumentElement().getNodeName();
            if ("new-order-notification".equals(nodeValue)) {
                // handle create new order
                NewOrderNotification info = new NewOrderNotification(document);
                String serialNumber = info.getSerialNumber();
                try {
                    helper.createOrder(info, ProductStoreWorker.getProductStoreId(request), ProductStoreWorker.getStoreLocale(request));
                    sendResponse(response, serialNumber, null);
                } catch (GeneralException e) {
                    Debug.logError(e, module);
                    sendResponse(response, serialNumber, e);
                    return null;
                }
            } else if ("order-state-change-notification".equals(nodeValue)) {
                OrderStateChangeNotification info = new OrderStateChangeNotification(document);
                String serialNumber = info.getSerialNumber();
                try {
                    helper.processStateChange(info);
                    sendResponse(response, serialNumber, null);
                } catch (GeneralException e) {
                    Debug.logError(e, module);
                    sendResponse(response, serialNumber, e);
                    return null;
                }
            } else if ("risk-information-notification".equals(nodeValue)) {
                RiskInformationNotification info = new RiskInformationNotification(document);
                String serialNumber = info.getSerialNumber();
                try {
                    helper.processRiskNotification(info);
                    sendResponse(response, serialNumber, null);
                } catch (GeneralException e) {
                    Debug.logError(e, module);
                    sendResponse(response, serialNumber, e);
                    return null;
                }
            } else if ("authorization-amount-notification".equals(nodeValue)) {
                AuthorizationAmountNotification info = new AuthorizationAmountNotification(document);
                String serialNumber = info.getSerialNumber();
                try {
                    helper.processAuthNotification(info);
                    sendResponse(response, serialNumber, null);
                } catch (GeneralException e) {
                    Debug.logError(e, module);
                    sendResponse(response, serialNumber, e);
                    return null;
                }
            } else if ("charge-amount-notification".equals(nodeValue)) {
                ChargeAmountNotification info = new ChargeAmountNotification(document);
                String serialNumber = info.getSerialNumber();
                try {
                    helper.processChargeNotification(info);
                    sendResponse(response, serialNumber, null);
                } catch (GeneralException e) {
                    Debug.logError(e, module);
                    sendResponse(response, serialNumber, e);
                    return null;
                }
            } else if ("chargeback-amount-notification".equals(nodeValue)) {
                ChargebackAmountNotification info = new ChargebackAmountNotification(document);
                String serialNumber = info.getSerialNumber();
                try {
                    helper.processChargeBackNotification(info);
                    sendResponse(response, serialNumber, null);
                } catch (GeneralException e) {
                    Debug.logError(e, module);
                    sendResponse(response, serialNumber, e);
                    return null;
                }
            } else if ("refund-amount-notification".equals(nodeValue)) {
                RefundAmountNotification info = new RefundAmountNotification(document);
                String serialNumber = info.getSerialNumber();
                try {
                    helper.processRefundNotification(info);
                    sendResponse(response, serialNumber, null);
                } catch (GeneralException e) {
                    Debug.logError(e, module);
View Full Code Here

Examples of com.google.checkout.schema._2.NewOrderNotification

  private class NewOrderEventHandler extends CallBackEventHandler
      implements NewOrderNotificationListener {
    public void handleEvent(CallBackEvent event) {
      NewOrderNotificationEvent newOrder = (NewOrderNotificationEvent) event;
      NewOrderNotification newOrderNote = newOrder.getNewOrderNote();
      assertSame(NewOrderNotification.class, newOrderNote.getClass());
    }
View Full Code Here

Examples of com.google.checkout.schema._2.NewOrderNotification

  private class NewOrderEventHandler extends CallBackEventHandler
      implements NewOrderNotificationListener {
    public void handleEvent(CallBackEvent event) {
      NewOrderNotificationEvent newOrder = (NewOrderNotificationEvent) event;
      NewOrderNotification newOrderNote = newOrder.getNewOrderNote();
      assertNotNull(newOrderNote.getClass());
    }
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.