This commit introduces a comprehensive Stripe module with support for managing customers, products, prices, and payment links. It also includes endpoint routes, helpers, and database updates to support Stripe operations, such as creating and retrieving entities or handling payment workflows. Additionally, a stripe module was integrated into existing routes and objects to enable seamless interaction with Stripe APIs.
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace stripe;
|
|
require_once WD . '/modules/stripe/config/stripe_enabled_c.php';
|
|
require_once WD . '/modules/stripe/config/stripe_publishable_key_c.php';
|
|
require_once WD . '/modules/stripe/config/stripe_secret_key_c.php';
|
|
|
|
use stripe\config\stripe_enabled_c;
|
|
use stripe\config\stripe_publishable_key_c;
|
|
use stripe\config\stripe_secret_key_c;
|
|
use traits\module_config_t;
|
|
|
|
class stripe_c
|
|
{
|
|
use module_config_t;
|
|
|
|
/**
|
|
* The status of reCAPTCHA, whether it is enabled or not
|
|
* @var stripe_enabled_c
|
|
*/
|
|
public stripe_enabled_c $enabled;
|
|
/**
|
|
* The publishable key for stripe
|
|
* @var stripe_publishable_key_c
|
|
*/
|
|
public stripe_publishable_key_c $publishable_key;
|
|
/**
|
|
* The secret key for stripe
|
|
* @var stripe_secret_key_c
|
|
*/
|
|
public stripe_secret_key_c $secret_key;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->setupConfig('Stripe');
|
|
$this->allowUpdate([
|
|
stripe_enabled_c::class,
|
|
stripe_publishable_key_c::class,
|
|
stripe_secret_key_c::class
|
|
]);
|
|
$this->enabled = new stripe_enabled_c();
|
|
$this->publishable_key = new stripe_publishable_key_c();
|
|
$this->secret_key = new stripe_secret_key_c();
|
|
}
|
|
} |