<?php
	error_reporting(1);
	require_once('stripe-php/init.php');


	## Getting Started

	//\Stripe\Charge::create();

	\Stripe\Stripe::setApiKey('sk_live_S6O2jEg5pWSSWGiXuiC74YzH');

        echo $token  = $_POST['stripeToken'];

        $customer = \Stripe\Customer::create(array(
            'email' => 'customer@example.com',
            'card'  => $token
        ));
        echo "<pre>";print_r($customer);

        $charge = \Stripe\Charge::create(array(
            'customer' => $customer->id,
            'amount'   => 2000,
            'currency' => 'usd'
        ));

        echo '<h1>Successfully charged $20.00!</h1>';
?>