Skip to content

wndrfl/pizzaboy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pizzaboy

1. Authenticate a user with their Dominos account credentials

$user = $pizzaboy->login(<email>,<password>);

2. Create a new order

$order = $user->newOrder();

3. Add a pizza to this order

$order
	->newPizza('medium','hand-tossed')
	->setCheese('whole','normal')
	->setSauce('tomato','normal')
	->addPepperoni()
	->addPineapple()
	->save();

4. Set a delivery address for this order

$order
	->address()
	->setStreet($_POST['street'])
	->setCity($_POST['city'])
	->setRegion($_POST['state'])
	->setPostalCode($_POST['postal_code'])
	->save();

5. Place the order!

if($order->place()) {
	echo "Order placed!";
}else{
	echo "Order was not placed.";
}

About

An unofficial wrapper for the Dominos API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages