Merge pull request #4224 from jitendra-webkul/master

Removed commented code from paypal smart button controller
This commit is contained in:
Jitendra Singh 2020-11-02 17:36:33 +05:30 committed by GitHub
commit e9591f6c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 10 deletions

View File

@ -201,23 +201,23 @@ class SmartButtonController extends Controller
}
try {
// Cart::collectTotals();
Cart::collectTotals();
// $this->validateOrder();
$this->validateOrder();
// $cart = Cart::getCart();
$cart = Cart::getCart();
// $order = $this->orderRepository->create(Cart::prepareDataForOrder());
$order = $this->orderRepository->create(Cart::prepareDataForOrder());
// $this->orderRepository->update(['status' => 'processing'], $order->id);
$this->orderRepository->update(['status' => 'processing'], $order->id);
// if ($order->canInvoice()) {
// $invoice = $this->invoiceRepository->create($this->prepareInvoiceData($order));
// }
if ($order->canInvoice()) {
$invoice = $this->invoiceRepository->create($this->prepareInvoiceData($order));
}
// Cart::deActivateCart();
Cart::deActivateCart();
// session()->flash('order', $order);
session()->flash('order', $order);
return response()->json([
'success' => true,