Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

smile-io/sweettooth-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Get the latest version of the Sweet Tooth PHP library with:

git clone https://github.com/sweettooth/sweettooth-php

To get started, add the following to your PHP script:

require_once("/path/to/sweettooth-php/lib/SweetTooth.php");

Simple usage looks like:

SweetTooth::setApiKey('sk_gUjtToMzKybHZ3yGg3C4Sv4L');
$newCustomerData = array(
	'first_name' => 'Wayne', 
	'last_name' => 'Rooney', 
	'email' => 'wrooney@example.com'
);
$customer = SweetTooth_Customer::create($newCustomerData);
echo $customer;

Documentation

Please see https://www.sweettoothrewards.com/api for up-to-date documentation.

Acknowledgements

Inspired by Stripe PHP