function setUp() { Recurly_js::$privateKey = "0123456789abcdef0123456789abcdef"; }
} } } } } } })); Route::get('load-existing-subs', function () { //go through existing subs and make sure that they are blanked out }); Route::get('signup', function () { Asset::add('jquery', 'js/jquery-min.js'); Asset::add('recurly.js', 'js/recurly.min.js'); Asset::add('default', 'default/recurly.css'); $o = Option::find('1'); Recurly_js::$privateKey = $o->recurly_private; $referrer = Input::get('referrer', ''); $signature = Recurly_js::sign(array('account' => array('account_code' => 'referral_' . rand()), 'subscription' => array('plan_code' => 'instant', 'currency' => 'USD'))); return View::make('recurly.signup')->with('signature', $signature)->with('referrer', $referrer); }); Route::get('logout', function () { Auth::logout(); return View::make('auth.login')->with('message', 'You have been successfully logged out'); }); Route::get('login', function () { $message = Session::get('message'); return View::make('auth.login')->with('message', $message); }); Route::post('login', function () { $input = Input::all(); $rules = array('username' => 'required', 'password' => 'required');
<?php Autoloader::map(array('Recurly' => __DIR__ . '/lib/recurly.php')); // include require_once __DIR__ . '/lib/recurly.php'; // load config $config = Config::get('recurly'); Recurly_Client::$apiKey = $config['api_key']; if (isset($config['private_key'])) { Recurly_js::$privateKey = $config['private_key']; }