Download the PHP package bozboz/checkout without Composer

On this page you can find all versions of the php package bozboz/checkout. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 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. http://gitlab.lab/bozboz/finecut
  2. http://gitlab.lab/bozboz/drusillas
  3. http://gitlab.lab/bozboz/benton

Setup

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

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

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.:

The above example will register the following URLs:

GET  /checkout
POST /checkout
GET  /checkout/customer
POST /checkout/customer
GET  /checkout/address
POST /checkout/address
GET  /checkout/delivery
POST /checkout/delivery
GET  /checkout/billing
POST /checkout/billing
GET  /checkout/complete
POST /checkout/complete

Screens

Screens must extend Bozboz\Ecommerce\Checkout\Screen and must define a view() method.

Additionally, a canSkip method is supported, which must return a boolean. If this method returns true, the screen will be skipped in the process.

Processing the screen

To define a processing action (hit when the screen URL is POSTed to) the screen class must implement Bozboz\Ecommerce\Checkout\Processable. This interface requires a process() method be defined.

Providing this method does not throw an instance of Bozboz\Ecommerce\Checkout\ValidationException, the checkout process will progress to the next screen upon completion.

Troubleshooting

When using test payments, if you get a 500 Internal Server Error upon clicking 'Take my money', try excluding the checkout/billing route from csrf protection.
In App\Http\Middleware\VerifyCsrfToken, add


All versions of checkout with dependencies

PHP Build Version
Package Version
Requires illuminate/routing Version 5.2.*
illuminate/session Version 5.2.*
illuminate/support Version 5.2.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bozboz/checkout contains the following files

Loading the files please wait ....