easybib / stripe-php
This package is abandoned and no longer maintained.
The author suggests using the stripe/stripe-php package instead.
Stripe PHP Library [Unofficial: PHP 5.3+ clone]
dev-master
2013-10-30 12:42 UTC
Requires
- php: >=5.3
- ext-curl: *
Requires (Dev)
- simpletest/simpletest: 1.1.0
This package is not auto-updated.
Last update: 2022-02-01 12:20:38 UTC
README
This fork aims to be PHP 5.3 compatible and is not maintained by Stripe.
Testing
Installation
Obtain the latest version of the Stripe PHP bindings with:
git clone https://github.com/easybib/stripe-php
Or use packagist.org and put the following into your project's composer.json
:
"require": {
"easybib/stripe-php": "*"
}
To get started, add the following to your PHP script:
require_once("/path/to/stripe-php/lib/Stripe/Autoload.php");
\Stripe\Autoload::register();
Simple usage looks like:
require_once 'Stripe/Autoload.php';
\Stripe\Autoload::register();
Stripe\Base::setApiKey('d8e8fca2dc0f896fd7cb4cb0031ba249');
$myCard = array('number' => '4242424242424242', 'exp_month' => 5, 'exp_year' => 2015);
$charge = Stripe\Charge::create(array('card' => $myCard, 'amount' => 2000, 'currency' => 'usd'));
echo $charge;
Documentation
Please see https://stripe.com/api for up-to-date documentation.