This file contains hidden or 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 | |
class MyDataObjectAdmin extends ModelAdmin { | |
private static $managed_models = array('MyDataObject'); // Can manage multiple models | |
private static $url_segment = 'my-data-object'; // Linked as /admin/my-data-object/ | |
private static $menu_title = 'My DataObjects'; | |
public function getSearchContext() { |
This file contains hidden or 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('./lib/Stripe.php'); | |
if ($_POST) { | |
// Set your secret key: remember to change this to your live secret key in production | |
Stripe::setApiKey("SECRET_KEY"); | |
$error = ''; | |
$success = ''; | |
// Create the charge on Stripe's servers - this will charge the user's card |