Download the PHP package primitivesocial/shift4wrapper without Composer
On this page you can find all versions of the php package primitivesocial/shift4wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download primitivesocial/shift4wrapper
More information about primitivesocial/shift4wrapper
Files in primitivesocial/shift4wrapper
Package shift4wrapper
Short Description Wrapper for Shift4 API for Laravel
License MIT
Homepage https://github.com/primitivesocial/shift4wrapper
Informations about the package shift4wrapper
Shift4Wrapper
Wrapper for Shift4 API for Laravel
Installation
composer require primitivesocial/shift4wrapper
Then, publish the config file:
php artisan vendor:publish
You will need to add the following .env
variables.
SHIFT4_API_URL
: URL for the Shift4 API
SHIFT4_CLIENT_GUID
: GUID from Shift4
SHIFT4_AUTH_TOKEN
: Auth token from Shift4
I4GO_API_URL
: API URL for I4GO
SHIFT4_COMPANY_NAME
: Name of company on file with Shift4
SHIFT4_INTERFACE_NAME
: Name of interface on file with Shift4
Usage
Get Access Token
Shift4 access tokens are long term, so you should store these.
Create I4GO Token
Post Sale
Post Refund
Delete Invoice
Because the invoice number must be sent in the header for this call, the method is differently structured.
More methods can be viewed in the tests.
Testing
Shift4 requires certain testing to be done in order to qualify for use of their API in production. Passing tests can be found in the tests
folder. Tests are connected to Laravel's Log
class, which allows for ease of exporting test results for submission to Shift4.