Git Product home page Git Product logo

stripe-php's Introduction

Stripe PHP bindings <img src=“https://travis-ci.org/stripe/stripe-php.svg?branch=master” alt=“Build Status” />

You can sign up for a Stripe account at stripe.com.

Requirements

PHP 5.2 and later.

Installation

Obtain the latest version of the Stripe PHP bindings with:

git clone https://github.com/stripe/stripe-php

To get started, add the following to your PHP script:

require_once("/path/to/stripe-php/lib/Stripe.php");

Simple usage looks like:

Stripe::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 stripe.com/api for up-to-date documentation.

Tests

In order to run tests you have to install SimpleTest (packagist.org/packages/simpletest/simpletest) via Composer (getcomposer.org/) (recommended way):

composer.phar update --dev

Run test suite:

php ./test/Stripe.php

stripe-php's People

Contributors

ab avatar amber-stripe avatar amfeng avatar andrew-stripe avatar antonbabenko avatar boucher avatar briancollins avatar carl-stripe avatar ebroder avatar evan-stripe avatar gdb avatar jim-stripe avatar jimdanz avatar johnpbloch avatar jpiasetz avatar kyleconroy avatar lachy-stripe avatar metcalf avatar michelle avatar michelle-stripe avatar naomicbush avatar pborreli avatar pc avatar relequestual avatar richo avatar scottlangendyk avatar sentryjs avatar slexaxton avatar spakanati avatar vierbergenlars avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.