Download the PHP package aerni/snipcart-api without Composer
On this page you can find all versions of the php package aerni/snipcart-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aerni/snipcart-api
More information about aerni/snipcart-api
Files in aerni/snipcart-api
Package snipcart-api
Short Description A Laravel wrapper for the Snipcart API
License MIT
Homepage https://github.com/aerni/snipcart-api
Informations about the package snipcart-api
Laravel Snipcart API
This package makes it super easy to work with the Snipcart API in your Laravel application.
Installation
Install the package using Composer.
Set your Snipcart Live Secret
and Test Secret
in your .env
. You can find them in your Snipcart Dashboard.
You may also publish the config of the package.
The following config will be published to config/snipcart-api.php
.
Usage Example
Import the package at the top of your file. All of the following examples use the Facade.
The SnipcartApi
interface is made up of four parts. From defining the HTTP method to sending the request off to Snipcart.
This gets a Snipcart product by ID.
All responses are wrapped in a Laravel Collection to make working with it super easy.
Snipcart API Reference
Products
Snipcart API Reference on Products
Orders
Snipcart API Reference on Orders
Notifications
Snipcart API Reference on Notifications
Refunds
Snipcart API Reference on Refunds
Parameter Methods
Pass required or optional parameters to your requests using the fluent interface provided by this package. A common use case is to set a limit
and offset
to your request.
Parameter Methods API Reference
Consult the Snipcart API Reference Documentation to check which parameters are available to what endpoint.
Tests
Run the tests like this: