Download the PHP package treesapuk/laravel-square without Composer

On this page you can find all versions of the php package treesapuk/laravel-square. 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 laravel-square

Test Coverage Build Status Latest Stable Version License


Square integration with Laravel/Lumen >=5.5 built on nikolag/core

  1. Version Compatibility
  2. Installation guide
  3. Customer System
  4. Order System
  5. Examples
  6. Available methods
  7. Contributing
  8. Donation
  9. License

Version Compatibility

Library Version Laravel Version Square Version
2.3.x   >= 5.5 2.20190814 (Square Connect V1)
2.4.x   >= 6.x 2.20190925.0 (Square Connect V2)
2.5.x   >= 7.x 2.20190925.0 (Square Connect V2)
2.6.x   >= 8.x 3.20200528.1 (Square Connect V2)

Installation guide

composer require nikolag/laravel-square

Note: Due to Laravel Package Discovery, registering service providers and facades manually for this project as of Laravel 5.5 is deprecated and no longer required since the package is adapted to automatically register these stuff for you. But there are still couple of steps to do in order to use this package.


First you have to publish configuration files:

Check configuration files out at config/nikolag.php before continuing.

Important: If for some reason you can't see square driver inside of connections array, you'll have to add it manually. You can find configuration file here and copy everything from inside connections array and append to your connections array inside of published config file (config/nikolag.php)

nikolag configuration
Figure 1. Config file

After finishing with configuration files, you should run migrations with the following command


Then add your credentials for Square API inside of .env and also add fully qualified name (namespace) for your classes.

Customers system

To be able to utilize the customers system for Users, your User class must use HasCustomers trait.

You also need to define user namespace

Orders system

To be able to utilize the order system for Users, your Order class must use HasProducts trait and define $table property.

You also need to define couple of environment variables

Important: SQUARE_PAYMENT_IDENTIFIER represents name of the column where we will keep unique ID that Square generates once it saves an Order. This means that you will need to add new column to your Orders table which will hold that value.

Examples

Simple examples

Simple examples are moved to wiki pages to avoid unnecessary scrolling of README.md.

Examples with customers

Examples with customers are moved to wiki pages to avoid unnecessary scrolling of README.md.

Examples with order

Examples with orders are moved to the wiki pages to avoid unnecessary scrolling of README.md.

All traits and their methods

HasProducts

All methods for this trait are moved to the wiki pages to avoid unnecessary scrolling of README.md.

HasCustomers

All methods for this trait are moved to the wiki pages to avoid unnecessary scrolling of README.md.

All facades and their methods

Square

All methods for this facade are moved to the wiki pages to avoid unnecessary scrolling of README.md.

Contributing

Everyone is welcome to contribute to this repository, simply open up an issue and label the request, whether it is an issue, bug or a feature. For any other enquiries send an email to [email protected]

Contributors

Name Changes Date
@Godlikehobbit Add optional currency parameter to charge function pull request #6 2017-09-12
@PaulJulio Cap square/connect version to resolve deprecation exceptions pull request #27 2019-09-20

Special thanks to all of the contributors!

Donating

Donate

Any amount helps to dedicate more time and resources for developing new stuff and keeping the library up-to-date with both Laravel and Square changes in the future. It will also help in creating future projects under the same brand.

License

MIT License

Copyright (c) Nikola Gavrić [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of laravel-square with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
illuminate/support Version ~5.5|~5.6|~5.7|~5.8|~6.0|~7.0|~8.0
illuminate/config Version ~5.5|~5.6|~5.7|~5.8|~6.0|~7.0|~8.0
illuminate/console Version ~5.5|~5.6|~5.7|~5.8|~6.0|~7.0|~8.0
illuminate/contracts Version ~5.5|~5.6|~5.7|~5.8|~6.0|~7.0|~8.0
illuminate/container Version ~5.5|~5.6|~5.7|~5.8|~6.0|~7.0|~8.0
illuminate/database Version ~5.5|~5.6|~5.7|~5.8|~6.0|~7.0|~8.0
illuminate/filesystem Version ~5.5|~5.6|~5.7|~5.8|~6.0|~7.0|~8.0
square/connect Version 3.20200528.1
nikolag/core Version 2.5.*
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 treesapuk/laravel-square contains the following files

Loading the files please wait ....