Using stripe for payment

1)To start… set up an account at, this is comletely free.
2)Once you’ve done this.. download the Stripe library from here
3)Go to your account and then account settings,then api keys…copy the one saying “API Keys” and use as key in code below.

isset($_POST)) {
$payment = Stripe_Charge::create(array(
          'amount'        => $_POST['amount'],
          'currency'      => $_POST['currency'],
          'card'          => array(
          'number'    => $_POST['card'],
          'exp_month' => $_POST['expMonth'],
          'exp_year'  => $_POST['expYear'],
          'cvc'       => $_POST['cvc']
          'description'   => $_POST['description']

5)Use the test card credentials
for example
currency = USD
card = 4242424242424242
expiry month = 06
expiry year = 2018
cvc = 564
The original tutorial is located at
Thanks to Michael Budd


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s