Beispiel #1
0
        void OrderFrm_OrderCreated(object o, OrderCreatedEventArgs args)
        {
            // set test mode
            Controller.IsTest = args.TestMode;

            if (!args.TestMode)
            {

                // build audit string
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("Order Succeeded");
                sb.AppendLine("Landing Page: " + Controller.LandingPage.Url);
                sb.AppendLine("Offer Name: " + Controller.Offer.Name);
                sb.AppendLine("");
                sb.AppendLine("Offer Items");
                sb.AppendLine("===========================");
                //foreach (OrderItem item in args.NewOrder.Items)
                //{
                    //sb.AppendLine(item.Sku + " " + 0);
                sb.AppendLine("Sku" + " " + 0);
             //   }

              //  sb.AppendLine("Amount: " + args.NewOrder.Amount.ToString("c"));
                sb.AppendLine("Amount: " + 0);
                // create customer audit...
                CustomerUserAudit.CreateAudit
                    (
                        new CustomerUserAudit
                        {
                            AuditType = AuditType.CustomerAudit,
                            CustomerAuditType = CustomerAuditType.OrderSucceeded,
                            Message = sb.ToString(),
                            //DollarAmount = args.NewOrder.Amount,
                            DollarAmount =0,
                            UserID = Controller.Customer.ID
                        }
                    );
            }

            Page.Response.Redirect(this.SuccessUrl);
        }
Beispiel #2
0
 protected virtual void OnOrderCreated(OrderCreatedEventArgs args)
 {
     if (OrderCreated != null)
         OrderCreated(this, args);
 }