Skip to content

Commit

Permalink
Removed old test keys and simplified example code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Hall committed Nov 9, 2016
1 parent 1c5aea1 commit 3faf237
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Example.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

use \RapidWeb\SimpleStripe\Factories\SimpleStripeFactory;

$publishableKey = 'pk_test_tmdmCoJxEaUKDhNYkOBnXXOO';
$secretKey = 'sk_test_n4IUmv3VMmPPxDXSReIbergg';

$currency = 'GBP'; // Great British Pounds

$simpleStripe = SimpleStripeFactory::create($publishableKey, $secretKey, $currency);
$simpleStripe = SimpleStripeFactory::create('PUBLISHABLE_KEY', 'SECRET_KEY', 'GBP'); // GBP = Great British Pounds

if (isset($_POST['stripeToken'])) {

Expand All @@ -18,7 +13,7 @@
$charge = $simpleStripe->charge($amount, $_POST['stripeToken']);

if ($charge->succeeded) {
echo "Success!";
echo "Success! <a href=\"Example.php\">Make another payment.</a>";
} else {
if ($charge->problemType=='Card') {
echo $charge->problem;
Expand Down

0 comments on commit 3faf237

Please sign in to comment.