Files
api/services/nginx/app/traits/stripe_endpoint_t.php
T
Jepp9350 410ca84bf1 Add Stripe integration for customers, payments, and products
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.
2025-02-18 18:31:23 +01:00

38 lines
638 B
PHP

<?php
namespace traits;
use classes\stripe;
use Exception;
use Stripe\StripeClient;
trait stripe_endpoint_t
{
/**
* Stripe
* @var stripe $stripe
*/
protected stripe $stripe;
/**
* Get the Stripe client
* @return StripeClient
* @throws Exception
*/
public function getClient(): StripeClient
{
return $this->Stripe()->getClient();
}
/**
* Get the stripe class
* @return stripe
*/
public function Stripe(): stripe
{
if (!isset($this->stripe)) {
$this->stripe = new stripe();
}
return $this->stripe;
}
}