You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-38Lines changed: 50 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,9 @@ The [Checkfront Booking API](http://www.checkfront.com/developers/api/) allows y
8
8
This repository contains the open source PHP SDK and various example scripts. Except as otherwise noted, the Checkfront PHP SDK is licensed under the Apache Licence, Version 2.0
9
9
(http://www.apache.org/licenses/LICENSE-2.0.html)
10
10
11
-
11
+
---
12
12
13
13
## Features
14
-
---
15
14
16
15
The Checkfront API SDK provides the following functionality:
17
16
@@ -25,7 +24,6 @@ The Checkfront API SDK provides the following functionality:
25
24
26
25
27
26
## Installation & Usage
28
-
---
29
27
30
28
This repo is setup to extend off of the library created by Checkfront. To update this library, a Composer.json file has been created.
31
29
@@ -35,44 +33,47 @@ If you are not using [Composer](http://getcomposer.org), you should be. It's an
35
33
36
34
Let's install Checkfront-PHP-DK via the following few commands:
Now the needed code should be available within your project. At the top of your PHP script require the autoloader, if you are using a MVC such as CodeIgnitor or Laravel review their autoload guides. Obtain API credintials [https://{your-company}.checkfront.com/manage/developer/](https://{your-company}.checkfront.com/manage/developer/)
47
-
48
43
```bash
49
44
require 'vendor/autoload.php';
50
45
```
46
+
Now the needed code should be available within your project. At the top of your PHP script require the autoloader, if you are using a MVC such as CodeIgnitor or Laravel review their autoload guides.
47
+
Obtain API credintials [https://{your-company}.checkfront.com/manage/developer/](https://{your-company}.checkfront.com/manage/developer/)
48
+
49
+
50
+
51
+
---
51
52
52
53
> The repo example files are a good place to start.
53
54
54
55
```shell
55
56
PHP-SDK # → Root of Service
56
-
└── examples/
57
+
└── examples/
57
58
└── cart
58
-
├── Cart.php # → Main wrapper class, ADD API KEY
59
-
├── create.php # → Process $_POST request, add to cart session
60
-
├── Form.php # → Various PHP functions
61
-
├── index.php # → Default view, list avaiable inventory
62
-
└── README.md # → File overview
59
+
├── Cart.php # → Main wrapper class, ADD API KEY
60
+
├── create.php # → Process $_POST request, add to cart session
61
+
├── Form.php # → Various PHP functions
62
+
├── index.php # → Default view, list available inventory
The Booking Cart demo is a bare bones shopping card style booking page. It is not intended
5
-
for production use, and should act an example only. It's missing key validation and error
6
-
checking.
3
+
In this directory you will find examples and a working bare bones reservation booking system. Not intended for *production* use, and should act as an example to create an even better system. It is missing important validation and error checking.
7
4
5
+
##### QUICK GUIDE
6
+
Change `HOST`, `CONSUMER_KEY` and `CONSUMER_SECRET` within `Cart.php` file, this information can be obtained via your Checkfront account.
8
7
9
-
index.php
10
-
---------
11
8
12
-
The first page fetches available inventory based on the selected date (defaults to today) and
13
-
allows you to add multiple items to your session.
9
+
### index.php
14
10
15
-
API calls:
11
+
Default page fetches available inventory based on the selected date (defaults to today) and allows you to add multiple items.
12
+
13
+
**API calls:**
16
14
17
15
```
18
16
booking/session
19
17
item
20
18
```
21
19
22
-
create.php
23
-
----------
24
-
25
-
The create booking page is passed the cart id and the booking form fields are requested from
26
-
Checkfront and rendered on the page.
20
+
### create.php
27
21
28
-
Once a successful booking/create call has been completed, a url will be returned in the response. The
29
-
url can differ depending on the booking and your configuration.
22
+
Booking form fields are requested from Checkfront via API and rendered on the page.
30
23
24
+
Once a successful `booking/create` call has been completed, a url will be returned in the response. The url can differ depending on the booking and your configuration.
31
25
32
-
API calls:
33
-
26
+
**API calls:**
27
+
```
34
28
booking/session
35
29
booking/create
36
30
booking/form
31
+
```
37
32
38
33
39
-
Form.php
40
-
--------
41
-
34
+
### Form.php
42
35
The form class is an optional helper class that renders the form fields into html.
43
36
44
37
45
-
Cart.php
46
-
--------
47
-
48
-
Main wrapper class that encapsulates the Checkfront API and extends some custom calls. Add API Key & API Secret to this file.
38
+
### Cart.php
39
+
Main wrapper class that encapsulates the Checkfront API and extends some custom calls.
0 commit comments