Ejemplo n.º 1
0
    private void ProcessZeroPricePayment(CheckoutDetails checkout)
    {
        OrderNotifyService order = CreateOrder(checkout);

        Exception emailEx = order.SendOrderEmailNoThrow();

        StoreError.Instance.Exception = emailEx;

        order.ProcessPaymentComplete();

        StoreContext.ClearCheckoutSession();

        MainContext.RedirectMainControl("OrdersEdit.ascx", String.Format("OrderID={0}", order.OrderID));
    }
Ejemplo n.º 2
0
    private void ProcessZeroPricePayment(CheckoutDetails checkout)
    {
        OrderNotifyService order = CreateOrder(checkout);

        Exception emailEx = order.SendOrderEmailNoThrow();

        StoreError.Instance.Exception = emailEx;

        order.ProcessPaymentComplete();

        StoreContext.ClearCheckoutSession();

        Response.Redirect("CheckoutComplete.aspx?OrderID=" + order.OrderID +
                          "&IsTransaction=True" + GenerateIsEmailOKString(emailEx));
    }
Ejemplo n.º 3
0
    private void ProcessOfflinePaymentSuccess(CheckoutDetails checkout)
    {
        OrderNotifyService order = CreateOrder(checkout);

        // Do not send electronic goods for offline payment. Merchants should send them manually.

        //********************* For Testing *****************************
        //order.SendDownloadEmailByOrderID();

        Exception emailEx = order.SendOrderEmailNoThrow();

        StoreError.Instance.Exception = emailEx;

        StoreContext.ClearCheckoutSession();

        MainContext.RedirectMainControl("OrdersEdit.ascx", String.Format("OrderID={0}", order.OrderID));
    }
Ejemplo n.º 4
0
    private void ProcessOfflinePaymentSuccess(CheckoutDetails checkout)
    {
        OrderNotifyService order = CreateOrder(checkout);

        // Do not send electronic goods for offline payment. Merchants should send them manually.

        //********************* For Testing *****************************
        //order.SendDownloadEmailByOrderID();

        Exception emailEx = order.SendOrderEmailNoThrow();

        StoreError.Instance.Exception = emailEx;

        StoreContext.ClearCheckoutSession();

        Response.Redirect("CheckoutComplete.aspx?OrderID=" + order.OrderID +
                          "&IsTransaction=True" + GenerateIsEmailOKString(emailEx));
    }
Ejemplo n.º 5
0
    private void ProcessCreditCardPaymentSuccess(
        OrderNotifyService order,
        string gatewayOrderID,
        string log,
        string cvvStatus,
        string AvsAddrStatus,
        string AvsZipStatus
        )
    {
        if (!String.IsNullOrEmpty(log))
        {
            PaymentLog paymentLog = new PaymentLog();
            paymentLog.OrderID         = order.OrderID;
            paymentLog.PaymentResponse = log;
            paymentLog.PaymentGateway  = order.PaymentMethod;
            paymentLog.PaymentType     = "ProcessCreditCard";
            DataAccessContext.PaymentLogRepository.Save(paymentLog);
        }

        if (!String.IsNullOrEmpty(gatewayOrderID) ||
            !String.IsNullOrEmpty(cvvStatus) ||
            !String.IsNullOrEmpty(AvsAddrStatus) ||
            !String.IsNullOrEmpty(AvsZipStatus))
        {
            Order orderDetails = DataAccessContext.OrderRepository.GetOne(order.OrderID);
            orderDetails.GatewayOrderID = gatewayOrderID;
            orderDetails.CvvStatus      = cvvStatus;
            orderDetails.AvsAddrStatus  = AvsAddrStatus;
            orderDetails.AvsZipStatus   = AvsZipStatus;
            DataAccessContext.OrderRepository.Save(orderDetails);
        }

        Exception emailEx = order.SendOrderEmailNoThrow();

        StoreError.Instance.Exception = emailEx;

        order.ProcessPaymentComplete();

        StoreContext.ClearCheckoutSession();

        Response.Redirect("CheckoutComplete.aspx?OrderID=" + order.OrderID +
                          "&IsTransaction=True" + GenerateIsEmailOKString(emailEx));
    }