Release Note v0.8

Bazar v0.8 is released. Let's walk through the most important things about this release.

This release contains a lots of BREAKING CHANGE. You might use the git compare tool to see every code change. For the complete list of changes, please read the changelog.

Reworked Checkout

The Bazar\Cart\Checkout class has been removed. The checkout process is now handled by the gateway drivers, because this provides way bigger flexibility.

// CheckoutController.php

use Bazar\Support\Facades\Gateway;
use Bazar\Support\Facades\Cart;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;

public function checkout(Request $request)
{
    // via the Gateway facade
    $order = Gateway::driver('cash')->checkout($request, Cart::getModel());

    // via the Cart facade
    $order = Cart::checkout('cash');

    return $order->status === 'failed'
        ? Redirect::to('/cart')->with('message', 'Please try again!')
        : Redirect::to('/account/orders/'.$order->id);
}