private void SetupPayPalStandardForm()
        {
            PayPalLog payPalLog = StoreHelper.EnsurePayPalStandardCheckoutLog(cart, store, SiteRoot, pageId, moduleId);
            if (payPalLog == null)
            {
                // this shouldn't happen but if we don't have the log then hide the button
                btnPayPal.Visible = false;
                return;
            }

            litPayPalFormVariables.Text = StoreHelper.GetCartUploadFormFields(
                payPalLog.RowGuid,
                cart,
                store,
                commerceConfig);

            btnPayPal.PostBackUrl = commerceConfig.PayPalStandardUrl;
        }
Exemple #2
0
        private void SetupPayPalStandardForm()
        {
            if (cart == null)
            {
                return;
            }
            if (siteUser == null)
            {
                return;
            }

            if (cart.UserGuid == Guid.Empty)
            {
                cart.UserGuid = siteUser.UserGuid;
                cart.Save();
            }

            if (cart.CartOffers.Count == 0)
            {
                litOr.Visible     = false;
                btnPayPal.Visible = false;
                //btnGoogleCheckout.Visible = false;
                return;
            }

            PayPalLog payPalLog = StoreHelper.EnsurePayPalStandardCheckoutLog(cart, store, SiteRoot, pageId, moduleId);

            if (payPalLog == null)
            {
                return;
            }

            litPayPalFormVariables.Text = StoreHelper.GetCartUploadFormFields(
                payPalLog.RowGuid,
                cart,
                store,
                commerceConfig);

            btnPayPal.PostBackUrl = commerceConfig.PayPalStandardUrl;
        }