Add Stripe payment intents support and product subscription flag
Introduced functionality for handling Stripe payment intents, including creation, retrieval, and cancellation. Added a subscription_allowed flag to products for enabling subscription-specific operations. Integrated the necessary backend endpoints, object property updates, and route handling logic.
This commit is contained in:
@@ -9,6 +9,7 @@ require_once WD . '/modules/stripe/endpoints/stripe_endpoint_product.php';
|
||||
require_once WD . '/modules/stripe/endpoints/stripe_endpoint_prices.php';
|
||||
require_once WD . '/modules/stripe/endpoints/stripe_endpoint_invoice.php';
|
||||
require_once WD . '/modules/stripe/endpoints/stripe_endpoint_readers.php';
|
||||
require_once WD . '/modules/stripe/endpoints/stripe_endpoint_payment_intents.php';
|
||||
|
||||
|
||||
// Require all helper classes
|
||||
@@ -22,6 +23,7 @@ use Exception;
|
||||
use interfaces\stripe_i;
|
||||
use stripe\endpoints\stripe_endpoint_customers;
|
||||
use stripe\endpoints\stripe_endpoint_invoice;
|
||||
use stripe\endpoints\stripe_endpoint_payment_intents;
|
||||
use stripe\endpoints\stripe_endpoint_payment_link;
|
||||
use stripe\endpoints\stripe_endpoint_prices;
|
||||
use stripe\endpoints\stripe_endpoint_product;
|
||||
@@ -70,6 +72,11 @@ class stripe implements stripe_i
|
||||
* @var stripe_endpoint_readers
|
||||
*/
|
||||
public stripe_endpoint_readers $readers;
|
||||
/**
|
||||
* Payment intents endpoint
|
||||
* @var stripe_endpoint_payment_intents
|
||||
*/
|
||||
public stripe_endpoint_payment_intents $payment_intents;
|
||||
/**
|
||||
* Stripe client
|
||||
* @var StripeClient
|
||||
@@ -86,6 +93,7 @@ class stripe implements stripe_i
|
||||
$this->prices = new stripe_endpoint_prices();
|
||||
$this->invoice = new stripe_endpoint_invoice();
|
||||
$this->readers = new stripe_endpoint_readers();
|
||||
$this->payment_intents = new stripe_endpoint_payment_intents();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user