Package com.google.checkout.notification

Examples of com.google.checkout.notification.FinancialOrderState


        if (order != null) {
            String orderId = order.getString("orderId");

            // check for a financial state change
            FinancialOrderState oldFin = info.getPreviousFinancialOrderState();
            FinancialOrderState newFin = info.getNewFinancialOrderState();
            if (!oldFin.equals(newFin)) {
                // financial state change
                if (newFin.equals(FinancialOrderState.CANCELLED) || newFin.equals(FinancialOrderState.CANCELLED_BY_GOOGLE)) {
                    // cancel the order
                    if (!"ORDER_CANCELLED".equals(order.getString("statusId"))) {
                        OrderChangeHelper.cancelOrder(dispatcher, system, orderId);
                    }
                } else if (newFin.equals(FinancialOrderState.CHARGEABLE) && oldFin.equals(FinancialOrderState.REVIEWING)) {
                    // approve the order
                    if (!"ORDER_APPROVED".equals(order.getString("statusId"))) {
                        OrderChangeHelper.approveOrder(dispatcher, system, orderId, hasHoldOrderNotes(orderId));
                    }
                } else if (newFin.equals(FinancialOrderState.PAYMENT_DECLINED)) {
                    // reject the order
                    if (!"ORDER_REJECTED".equals(order.getString("statusId"))) {
                        OrderChangeHelper.rejectOrder(dispatcher, system, orderId);
                    }
                }
View Full Code Here


        if (order != null) {
            String orderId = order.getString("orderId");

            // check for a financial state change
            FinancialOrderState oldFin = info.getPreviousFinancialOrderState();
            FinancialOrderState newFin = info.getNewFinancialOrderState();
            if (!oldFin.equals(newFin)) {
                // financial state change
                if (newFin.equals(FinancialOrderState.CANCELLED) || newFin.equals(FinancialOrderState.CANCELLED_BY_GOOGLE)) {
                    // cancel the order
                    if (!"ORDER_CANCELLED".equals(order.getString("statusId"))) {
                        OrderChangeHelper.cancelOrder(dispatcher, system, orderId);
                    }
                } else if (newFin.equals(FinancialOrderState.CHARGEABLE) && oldFin.equals(FinancialOrderState.REVIEWING)) {
                    // approve the order
                    if (!"ORDER_APPROVED".equals(order.getString("statusId"))) {
                        OrderChangeHelper.approveOrder(dispatcher, system, orderId, hasHoldOrderNotes(orderId));
                    }
                } else if (newFin.equals(FinancialOrderState.PAYMENT_DECLINED)) {
                    // reject the order
                    if (!"ORDER_REJECTED".equals(order.getString("statusId"))) {
                        OrderChangeHelper.rejectOrder(dispatcher, system, orderId);
                    }
                }
View Full Code Here

TOP

Related Classes of com.google.checkout.notification.FinancialOrderState

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.