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
@@ -305,4 +305,19 @@ class departments_o extends db
}
return $tmp;
}
/**
* Check if the Stripe is configured for the department
* @note This is a link to the department_variables_o::isSet(stripe_terminal_location) method
* @return bool true If the Stripe is configured
* @throws Exception If the department is not selected
*/
public function isStripeConfigured(): bool
{
self::requireSelected();
if ($this->variables->isSet('stripe_terminal_location')) {
return true;
}
return false;
}
}