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
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
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.
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
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!
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?
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.
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....
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
Here the solution: Paypal button
Hi,
if I choose Paypal, the button don't appear. Why?
The code of checkoutconfirmationform in bazzar is:
Hi,
are there a solution, how to have paypal working?
Hi,
you need to mods some source code into bazzar. Check some post up.
Hi Biogio,
Thank you for your reply.
Whid mods should I check you please?
Thank you.
Mods:
SalePreparationOperationsController under Bazaar - Controllers - Surface source code
Add a method:
and into CheckoutConfirmationForm into Partials / View under your U7 installation - App_Plugins - Merchello.Bazaar - Themes add
The strange thing is that this workaround is not written anywhere ...
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
I've not tried with 1.11...with 1.10.1 it's ok.
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.
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
Sory for late reply, my github is connected to email [email protected]. Do you need something else?
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!
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
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?
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.
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.
Hi, Pierre
check here: https://gist.github.com/biapar/9d5d18d03b0be7729681
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....
is working on a reply...