Ejemplo n.º 1
0
        public ActionResult Index(PaymentViewModel payment)
        {
            TransactionLibrary.CreatePayment(
                paymentMethodId: payment.SelectedPaymentMethodId,
                requestPayment: false,
                amount: -1,
                overwriteExisting: true);

            TransactionLibrary.ExecuteBasketPipeline();

            return(Redirect("/preview"));
        }
Ejemplo n.º 2
0
        protected void SavePaymentAndGoToPreviewBtn_OnClick(object sender, EventArgs e)
        {
            var selectedPaymentMethodId = Int32.Parse(AvailablePaymentMethods.SelectedValue);

            TransactionLibrary.CreatePayment(
                paymentMethodId: selectedPaymentMethodId,
                requestPayment: false,
                amount: -1,
                overwriteExisting: true);

            TransactionLibrary.ExecuteBasketPipeline();

            Response.Redirect("/preview");
        }
        public ActionResult Index(PaymentViewModel payment)
        {
            TransactionLibrary.CreatePayment(
                paymentMethodId: payment.SelectedPaymentMethodId,
                requestPayment: false,
                amount: -1,
                overwriteExisting: true);

            TransactionLibrary.ExecuteBasketPipeline();

            var parent  = PublishedRequest.PublishedContent.AncestorOrSelf("basket");
            var preview = parent.Children(x => x.Name == "Preview").FirstOrDefault();

            return(Redirect(preview.Url));
        }
Ejemplo n.º 4
0
        public ActionResult Index(PaymentViewModel payment)
        {
            TransactionLibrary.CreatePayment(
                paymentMethodId: payment.SelectedPaymentMethodId,
                requestPayment: false,
                amount: -1,
                overwriteExisting: true);

            TransactionLibrary.ExecuteBasketPipeline();

            var root    = UmbracoContext.PublishedContentRequest.PublishedContent.AncestorsOrSelf("homePage").FirstOrDefault();
            var preview = root.Descendants("previewItems").FirstOrDefault();

            return(Redirect(preview.Url));
        }
Ejemplo n.º 5
0
        public void btnContinue_Click(object sender, EventArgs e)
        {
            var paymentPicker = Page.FindWebPart <CMSWebParts_Ucommerce_PaymentPicker>();

            if (paymentPicker == null)
            {
                return;
            }

            int methodPaymentId;

            if (!Int32.TryParse(paymentPicker.SelectedValue, out methodPaymentId))
            {
                return;
            }

            TransactionLibrary.CreatePayment(methodPaymentId, requestPayment: false);
            HttpContext.Current.Response.Redirect("~/Basket/Preview");
        }
 public ActionResult Index(PaymentViewModel payment)
 {
     TransactionLibrary.CreatePayment(payment.SelectedPaymentMethodId, requestPayment: false);
     TransactionLibrary.ExecuteBasketPipeline();
     return(Redirect("/store/preview"));
 }
Ejemplo n.º 7
0
        protected virtual Payment CreatePayment(PurchaseOrder purchaseOrder, PaymentMethod paymentMethod, decimal amount)
        {
            var payment = TransactionLibrary.CreatePayment(paymentMethod.PaymentMethodId, amount: amount, requestPayment: false, overwriteExisting: false);

            return(payment);
        }