Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Jul 02, 2015 @ 13:18
    Biagio Paruolo
    0

    Where is confirm button when I choose Paypal as payment method?

    Where is confirm button when I choose Paypal as payment method?

    U7.2.6 + Merchello 1.9 + Paypal 1.0.4

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Jul 07, 2015 @ 12:53
    Biagio Paruolo
    0

    Here the solution: Paypal button

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Jul 07, 2015 @ 13:50
    Biagio Paruolo
    0

    Hi,

    if I choose Paypal, the button don't appear. Why?

    The code of checkoutconfirmationform in bazzar is:

     @if (Model.ResolvePaymentForms)
            {
                foreach (var frm in Model.PaymentMethodUiInfo)
                {
                    var rvd = new RouteValueDictionary { { "model", Model } };
                    if (frm.UrlActionParams.RouteParams.Any())
                    {
                        foreach (var val in frm.UrlActionParams.RouteParams)
                        {
                            rvd.Add(val.Item1, val.Item2);
                        }
                    }
                    <div id="@frm.Alias" class="payment-method-form">
                        @Html.Action(frm.UrlActionParams.Method, frm.UrlActionParams.Controller, rvd)
                    </div>
                }
            }
            else
            {
                <div id="CashPaymentMethod" class="payment-method-form">
                    @Html.Action("RenderForm", "CashPaymentMethod", new { area = "Bazaar", model = Model })
                </div>
            }
    
  • Simon 692 posts 1068 karma points
    Aug 05, 2015 @ 14:30
    Simon
    0

    Hi,

    are there a solution, how to have paypal working?

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Aug 08, 2015 @ 16:27
    Biagio Paruolo
    0

    Hi,

    you need to mods some source code into bazzar. Check some post up.

  • Simon 692 posts 1068 karma points
    Aug 09, 2015 @ 17:21
    Simon
    0

    Hi Biogio,

    Thank you for your reply.

    Whid mods should I check you please?

    Thank you.

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Aug 10, 2015 @ 09:50
    Biagio Paruolo
    0

    Mods:

    SalePreparationOperationsController under Bazaar - Controllers - Surface source code

    Add a method:

     [HttpPost]
            public ActionResult ConfirmPayPalSale(CheckoutConfirmationForm model)
            {
                if (!ModelState.IsValid) return this.CurrentUmbracoPage();
    
                var preparation = Basket.SalePreparation();
                preparation.RaiseCustomerEvents = false;
    
                preparation.ClearShipmentRateQuotes();
                var shippingAddress = Basket.SalePreparation().GetShipToAddress();
    
                // Get the shipment again
                var shipment = Basket.PackageBasket(shippingAddress).FirstOrDefault();
    
                // get the quote using the "approved shipping method"
                var quote = shipment.ShipmentRateQuoteByShipMethod(model.ShipMethodKey);
    
                // save the quote
                Basket.SalePreparation().SaveShipmentRateQuote(quote);
    
                var paymentMethod = GatewayContext.Payment.GetPaymentGatewayMethodByKey(model.PaymentMethodKey).PaymentMethod;
                preparation.SavePaymentMethod(paymentMethod);
    
                // AuthorizePayment will save the invoice with an Invoice Number.
                var attempt = preparation.AuthorizePayment(paymentMethod.Key);
    
                if (!attempt.Payment.Success)
                {
                    return this.CurrentUmbracoPage();
                }
    
                // Trigger the order confirmation notification
                var billingAddress = attempt.Invoice.GetBillingAddress();
                string contactEmail;
                if (string.IsNullOrEmpty(billingAddress.Email) && !CurrentCustomer.IsAnonymous)
                {
                    contactEmail = ((ICustomer)CurrentCustomer).Email;
                }
                else
                {
                    contactEmail = billingAddress.Email;
                }
    
                if (!string.IsNullOrEmpty(contactEmail))
                {
                    Notification.Trigger("OrderConfirmation", attempt, new[] { contactEmail });
                }
    
                // store the invoice key in the CustomerContext for use on the receipt page.
                CustomerContext.SetValue("invoiceKey", attempt.Invoice.Key.ToString());
    
                string url = attempt.Payment.Result.ExtendedData.GetValue("RedirectUrl");
                return Redirect(url);
            }
    

    and into CheckoutConfirmationForm into Partials / View under your U7 installation - App_Plugins - Merchello.Bazaar - Themes add

    <!-- PayPal Payment Method -->
            <div id="PayPalPayment" class="payment-method-form">
                @using (Html.BeginUmbracoForm<SalePreparationOperationsController>("ConfirmPayPalSale", null, new { @id = "ConfirmPayPalSale" }))
                {
                    @Html.HiddenFor(x => x.ShipMethodKey, new { @class = "selected-shipmethod-key" })
                    @Html.HiddenFor(x => x.PaymentMethodKey, new { @class = "selected-paymentmethod-key" })
                    @Html.HiddenFor(x => x.CustomerToken, new { @id = "customer-token" })
                    @Html.HiddenFor(x => x.ReceiptPageId)
                    <div class="form-group">
                        <button type="submit" class="btn btn-primary">Confirm Sale</button>
                    </div>
                }
            </div>
    

    The strange thing is that this workaround is not written anywhere ...

  • PierreD Savard 183 posts 290 karma points
    Sep 17, 2015 @ 13:27
    PierreD Savard
    0

    I can't found how to make this work in Bazaar 1.11....

    1- A create a PayPalPayementMethodForm.cshtml under the partial folder of the current theme. 2- I copy the code above, but the SalePreparationOperationsController in the code is not working. The CashProvider form use an CashPaymentMethodController directly.

    Any advise? Someone make this work in the 1.11 version of Bazaar? Thank

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Sep 18, 2015 @ 13:57
    Biagio Paruolo
    0

    I've not tried with 1.11...with 1.10.1 it's ok.

  • PierreD Savard 183 posts 290 karma points
    Sep 30, 2015 @ 15:44
    PierreD Savard
    0

    Can you share you bazzaar working source code? I whant to compare with mine. I do something wrong and I need to make paypal work soon to deliver my projet to my client.

  • Jason 92 posts 175 karma points
    Oct 01, 2015 @ 21:33
    Jason
    0

    Pierre I have a bare-bone Bazaar /merchello 1.10 solution with working paypal . It's currently a private repository so send me your github details and I'll sort you out with a clone

  • PierreD Savard 183 posts 290 karma points
    Oct 06, 2015 @ 20:13
    PierreD Savard
    0

    Sory for late reply, my github is connected to email [email protected]. Do you need something else?

  • Milly 30 posts 130 karma points
    May 16, 2016 @ 16:33
    Milly
    0

    Hi I know this is an old post but I am really stuck with getting Paypal to work!! I'd be super grateful if you could share your version with me. My Github username is mbbillz. Thank you!

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Oct 02, 2015 @ 05:25
    Biagio Paruolo
    0

    I've mods only one file in bazaar project and one in the theme. If you I send them. I'll post them in git

  • PierreD Savard 183 posts 290 karma points
    Oct 09, 2015 @ 20:42
    PierreD Savard
    0

    Can you share these 2 files for comparison? I try to make this confirmation buton working. I thinking upgrading to version 7.3 and bazaar .13 but I don't think the paypal integration is aleready included?

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Oct 10, 2015 @ 07:43
    Biagio Paruolo
    0

    Hi,

    Paypal is not included and also if you install it, out of the box you don't see it into drilldown without some customization and this is not reported by documentation.

  • PierreD Savard 183 posts 290 karma points
    Oct 13, 2015 @ 16:51
    PierreD Savard
    0

    Can we have an blog post with an How To! I lost my mind trying to make paypal working! I can't deliver to my customer because of that.

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Oct 15, 2015 @ 11:00
  • PierreD Savard 183 posts 290 karma points
    Oct 15, 2015 @ 14:30
    PierreD Savard
    0

    Thank Biagio for your post. But with the 1.11 of Bazaar, all the process change. But not many documentation. For exemple, we do not change the CheckoutConfirmationForm.cshtml anymore, instead we have the create a new cshtml. I need source code for 1.11 I think....

Please Sign in or register to post replies

Write your reply to:

Draft