Add Mollie API integration and webhook for software upgrade payments

- Introduced the `CaBundle.php` class for managing CA certificates.
- Updated `installed.json` and `installed.php` to include the new `composer/ca-bundle` dependency.
- Added `platform_check.php` to enforce PHP version requirements.
- Created `initialize.php` for initializing the Mollie API client with the API key.
- Implemented `webhook_mollie.php` to handle webhook callbacks for software upgrade payments, including transaction status updates and invoice generation.
- Integrated DomPDF for generating invoices and sending them via email.
This commit is contained in:
“VeLiTi”
2025-12-21 14:44:37 +01:00
parent 653e33d7e9
commit 0f968aac14
159 changed files with 16197 additions and 21 deletions

View File

@@ -15,10 +15,30 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
}
$bearertoken = createCommunicationToken($_SESSION['userkey']);
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
// PAYMENT RETURN DETECTION
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
$payment_return = isset($_GET['payment_id']) ? $_GET['payment_id'] : null;
$payment_return_status = isset($_GET['payment_return']) ? $_GET['payment_return'] : null;
template_header('Softwaretool', 'softwaretool','view');
$view = '
// Show payment return message if returning from payment
if ($payment_return && $payment_return_status) {
$view = '
<div class="content-title">
<div style="background: #d4edda; border: 1px solid #c3e6cb; color: #155724; padding: 15px; border-radius: 6px; margin-bottom: 20px;">
<i class="fa-solid fa-check-circle"></i>
<strong>Payment Successful!</strong>
<p style="margin: 10px 0 0 0;">Your payment has been processed. Please reconnect your device to apply the software upgrade.</p>
<p style="margin: 5px 0 0 0; font-size: 12px; color: #666;">Payment ID: '.htmlspecialchars($payment_return).'</p>
</div>
</div>';
} else {
$view = '';
}
$view .= '
<div class="content-title">
<div class="title">
<i class="fa-solid fa-box-open"></i>