PHPackages                             bozboz/checkout - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. bozboz/checkout

AbandonedLibrary[Payment Processing](/categories/payments)

bozboz/checkout
===============

v2.0.0(8y ago)02.0k1PHP

Since Jun 2Pushed 4y ago3 watchersCompare

[ Source](https://github.com/bozboz/checkout)[ Packagist](https://packagist.org/packages/bozboz/checkout)[ RSS](/packages/bozboz-checkout/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (5)Used By (1)

Checkout
========

[](#checkout)

Define a series of interconnecting screens that plug together as part of a continuous process.

For examples of implementation look at these repos:

1.
2.
3.

Setup
-----

[](#setup)

1. Require the package in Composer, by running `composer require bozboz/checkout`
2. Add the service provider in app/config/app.php

```
    Bozboz\Ecommerce\Checkout\Providers\CheckoutServiceProvider::class,

```

3. Add the `Checkout` facade to the aliases array in `in app/config/app.php`

```
    'Checkout' => Bozboz\Ecommerce\Checkout\Facades\Checkout::class,

```

Usage
-----

[](#usage)

1. Register a new checkout process using the Checkout facade in `app/Http/routes.php`
2. Set a repository on the facade with the `using` method. The repository must implement the `Bozboz\Ecommerce\Checkout\CheckoutableRepository` interface and its purpose is to fetch the checkoutable instance. The instance must implement the Checkoutable interface. (The orders package has a default implementation to fetch the order instance from the session, `Bozboz\Ecommerce\Orders\OrderRepository`).
3. On the returned object, call `add` to add screens. The add method takes 4 parameters:
    1. The URL the screen will respond to
    2. The Screen class to use (resolved out the IoC container)
    3. An optional additional label to identify the screen, primarily used in the progress bar
    4. Route parameters (uses, as, before, etc.)

e.g.:

```
