private static void HandleOrderStateChangeNotification(GCheckout.AutoGen.OrderStateChangeNotification inputOrderStateChangeNotification)
    {
        // Charge Order If Chargeable
        if ((inputOrderStateChangeNotification.previousfinancialorderstate.ToString().Equals("REVIEWING")) && (inputOrderStateChangeNotification.newfinancialorderstate.ToString().Equals("CHARGEABLE")))
        {
            GCheckout.OrderProcessing.ChargeOrderRequest oneChargeOrderRequest = new GCheckout.OrderProcessing.ChargeOrderRequest(inputOrderStateChangeNotification.googleordernumber);
            GCheckout.Util.GCheckoutResponse             oneGCheckoutResponse  = oneChargeOrderRequest.Send();
        }

        // Update License If Charged
        if ((inputOrderStateChangeNotification.previousfinancialorderstate.ToString().Equals("CHARGING")) && (inputOrderStateChangeNotification.newfinancialorderstate.ToString().Equals("CHARGED")))
        {
            // TODO: For each shopping cart item received in the NewOrderNotification, authorize the license
        }

        // TODO: Add custom processing for this notification type
    }
예제 #2
0
    private static void HandleOrderStateChangeNotification(GCheckout.AutoGen.OrderStateChangeNotification notification)
    {
        // Charge Order If Chargeable
        if ((notification.previousfinancialorderstate == GCheckout.AutoGen.FinancialOrderState.REVIEWING) &&
            (notification.newfinancialorderstate == GCheckout.AutoGen.FinancialOrderState.CHARGEABLE))
        {
            ChargeOrderRequest oneChargeOrderRequest = new ChargeOrderRequest(notification.googleordernumber);
            GCheckout.Util.GCheckoutResponse oneGCheckoutResponse = oneChargeOrderRequest.Send();
        }

        // Update License If Charged
        if ((notification.previousfinancialorderstate == GCheckout.AutoGen.FinancialOrderState.CHARGING) &&
            (notification.newfinancialorderstate == GCheckout.AutoGen.FinancialOrderState.CHARGED))
        {
            // TODO: For each shopping cart item received in the NewOrderNotification, authorize the license
        }

        // TODO: Add custom processing for this notification type
    }