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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user