Skip to content

Instantly share code, notes, and snippets.

@ha1t
Created January 31, 2013 08:02
Show Gist options
  • Save ha1t/4681169 to your computer and use it in GitHub Desktop.
Save ha1t/4681169 to your computer and use it in GitHub Desktop.
<?php
class StoreController extends AppController
{
public function buy()
{
$customer = Customer::get(Param::get('customer_id'));
$store = Store::get(Param::get('store_id'));
$item = Item::get('item_id'));
try {
StoreService::purchase($customer, $item);
} catch (Exception $e) {
// 失敗した時の処理
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment