61 lines
1.7 KiB
PHP
61 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* app/plugins/donate/plugin.php
|
|
*
|
|
* This houses all of the main plugin info and functionality.
|
|
*
|
|
* @package TP Donate
|
|
* @version 3.0
|
|
* @author Joey Kimsey <Joey@thetempusproject.com>
|
|
* @link https://TheTempusProject.com
|
|
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
|
|
*/
|
|
namespace TheTempusProject\Plugins;
|
|
|
|
use TheTempusProject\TheTempusProject as App;
|
|
use TheTempusProject\Classes\Plugin;
|
|
use Stripe\StripeClient;
|
|
use TheTempusProject\Bedrock\Classes\Config;
|
|
use TheTempusProject\Hermes\Functions\Route as Routes;
|
|
use TheTempusProject\Models\Memberships;
|
|
|
|
class Donate extends Plugin {
|
|
public static $stripe;
|
|
private static $loaded = false;
|
|
public $pluginName = 'TP Donations';
|
|
public $configName = 'donations';
|
|
public $pluginAuthor = 'JoeyK';
|
|
public $pluginWebsite = 'https://TheTempusProject.com';
|
|
public $modelVersion = '1.0';
|
|
public $pluginVersion = '3.0';
|
|
public $pluginDescription = 'A simple plugin which adds a site wide donation system.';
|
|
public $permissionMatrix = [
|
|
'controlMemberships' => [
|
|
'pretty' => 'Can donate.',
|
|
'default' => true,
|
|
],
|
|
];
|
|
public $main_links = [
|
|
[
|
|
'text' => 'Donate!',
|
|
'url' => '{ROOT_URL}donate',
|
|
],
|
|
];
|
|
public $configMatrix = [
|
|
'stripePublishable' => [
|
|
'type' => 'text',
|
|
'pretty' => 'Stripe Publishable key',
|
|
'default' => 'pk_xxxxxxxxxxxxxxx',
|
|
],
|
|
'stripeSecret' => [
|
|
'type' => 'text',
|
|
'pretty' => 'Stripe Secret key',
|
|
'default' => 'sk_xxxxxxxxxxxxxxx',
|
|
],
|
|
];
|
|
|
|
public function __construct( $load = false ) {
|
|
parent::__construct( $load );
|
|
}
|
|
}
|