Skip to content

Instantly share code, notes, and snippets.

@nateabele
Created September 23, 2013 14:30
Show Gist options
  • Save nateabele/6671311 to your computer and use it in GitHub Desktop.
Save nateabele/6671311 to your computer and use it in GitHub Desktop.
How to integrate Stripe with Lithium
<?php
/** config/bootstrap/libraries.php **/
// ...
Libraries::add('stripe', array(
'path' => LITHIUM_APP_PATH . '/libraries/stripe/lib',
'prefix' => null
));
?>
@monachilada
Copy link

So what i get confused about is how do I then use it in my controllers. Do I have to bootstrap it and tell it to load all the classes manually? And where does namespacing come in to it? Basically, I would love to be able to do something like:

namespace app\controllers;

use libraries\stripe;

class SomethingController extends etcController {
 public function view() {
  $charge = Charge::create($params);
 }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment