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:
Jepp9350
2025-04-08 14:11:11 +02:00
parent d76bf03e95
commit e4ec92d66c
9 changed files with 539 additions and 0 deletions
@@ -22,6 +22,7 @@ class productsRoute
'name' => (string)$product['name'],
'description' => (string)$product['description'],
'price' => (int)$product['price'],
'subscription_allowed' => (boolean)$product['subscription_allowed'],
'category' => (int)$product['category'],
'piktogram' => (string)$product['piktogram'],
'economic_product_id' => (int)$product['economic_product_id'],
@@ -174,6 +175,9 @@ class productsRoute
if (self::isParametersSet(['price'])) {
$product->price->set($response->getRequestParameter('price'));
}
if (self::isParametersSet(['subscription_allowed'])) {
$product->subscription_allowed->set($response->getRequestParameter('subscription_allowed') ? 1 : 0);
}
if (self::isParametersSet(['category'])) {
$product->category->set($response->getRequestParameter('category') ?? '');
}