Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.27 KB

readme.md

File metadata and controls

49 lines (31 loc) · 1.27 KB

Stripe Bundle

Stripe Laravel bundle is simple API wrapper for Stripe's PHP API.

Install using Artisan CLI:

php artisan bundle:install stripe

Either auto-load the bundle in application/bundles.php:

return array(
	'stripe' => array('auto'=>true)
);

Or manually start:

Bundle::start('stripe');

You can than use the Stripe API like normal (see Stripe API https://stripe.com/docs/api?lang=php)

Stripe::setApiKey("YOUR_KEY");
Stripe_Charge::create(array(
	"amount" => 40000,
	"currency" => "usd",
	"card" => "tok_Ydsdsedsad", // obtained with Stripe.js
	"description" => "Donation because you rock!")
);

If you don't want to call Stripe::setApiKey("YOUR_KEY"); all the time you can create a stripe.php config file with the following entry:

return array(
	'api_key' => 'YOUR_KEY',
	'api_version' => 'VERSION'
);

Stripe has introduced a version number to avoid breaking changes.

##Current Stripe Versions

Stripe is an payment company with a simple API and a reasonable fee structure.