This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* AcmeTestBundle/Controller/AdminController.php | |
*/ | |
namespace Acme\TestBundle\Controller; | |
use eZ\Bundle\EzPublishCoreBundle\Controller; | |
/** | |
* Here is your Symfony controller, defined as a service (see service definition below) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello World. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'path-to-Stripe.php'; | |
if ($_POST) { | |
Stripe::setApiKey("YOUR-API-KEY"); | |
$error = ''; | |
$success = ''; | |
try { | |
if (!isset($_POST['stripeToken'])) | |
throw new Exception("The Stripe Token was not generated correctly"); |