Skip to content

Square-Developers/php-getting-started

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Square PHP SDK Quickstart

This quickstart sample creates a Square client instance with your Square access token and then lists the locations in your account. The sample is based on the PHP SDK Quickstart guide.

Setup

Install PHP - If you don't already have php installed on your machine

Install Composer - If you don't already have composer installed on your machine

Quickstart Instructions

  1. Change into the quickstart directory

  2. copy .env.example to .env and replace with your access token

    SQUARE_ACCESS_TOKEN=yourSandboxAccessToken
    
  3. Install latest version of square dependencies

    $ composer require square/square
    
  4. Run the code

    $ php -S localhost:8000
    
  5. Navigate to localhost:8000/quickstart.php and you should output similar to this:

    LHI1YXJ8YSV5Z: Default Test Account, 1600 Pennsylvania Ave NW, Washington
    

Resources

Square PHP SDK Guide - details on how to use / configure the Square client.

Packagist Repository for Square - Where the package files are hosted

PHP SDK Source Code - Github repo with sdk source code

About

Quickly get started with Square's Developer Platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages