mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 12:18:43 +09:00
Polish exception imports and invoice modal payload (#3891)
This commit is contained in:
1 parent
80c0322aeb
commit
2e97e7b710
6 files changed
+10
-9
No files matched your search
@@ -27,9 +27,9 @@ class Box_AppAdmin extends Box_App
|
||||
|
||||
protected function checkPermission(): void
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* Disable permission checks when an update is pending finalization.
|
||||
*
|
||||
*
|
||||
* This is to make sure update finalization still works when there are changes to the
|
||||
* permission system and patches need to be applied before everything starts working again.
|
||||
*/
|
||||
|
||||
@@ -58,9 +58,9 @@ final class Dispatcher implements InjectionAwareInterface
|
||||
throw new Exception('FOSSBilling module :mod is not installed/activated', [':mod' => $mod], 715);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Disable permission checks when an update is pending finalization.
|
||||
*
|
||||
*
|
||||
* This is to make sure update finalization still works when there are changes to the
|
||||
* permission system and patches need to be applied before everything starts working again.
|
||||
*/
|
||||
|
||||
@@ -535,7 +535,7 @@ class Service implements InjectionAwareInterface
|
||||
}
|
||||
|
||||
if (!$client instanceof \Model_Client) {
|
||||
throw new \FOSSBilling\InformationException('Client not found');
|
||||
throw new InformationException('Client not found');
|
||||
}
|
||||
|
||||
return $client;
|
||||
|
||||
@@ -1472,14 +1472,14 @@ class Service implements InjectionAwareInterface
|
||||
|
||||
$invoice = $this->di['db']->findOne('Invoice', 'hash = ?', [$data['hash']]);
|
||||
if (!$invoice instanceof \Model_Invoice) {
|
||||
throw new \FOSSBilling\InformationException('Invoice not found', null, 812);
|
||||
throw new InformationException('Invoice not found', null, 812);
|
||||
}
|
||||
|
||||
$this->checkInvoiceAuth($invoice, InvoiceOperation::PAYMENT);
|
||||
|
||||
$gtw = $this->di['db']->load('PayGateway', $data['gateway_id']);
|
||||
if (!$gtw instanceof \Model_PayGateway) {
|
||||
throw new \FOSSBilling\InformationException('Payment method not found', null, 813);
|
||||
throw new InformationException('Payment method not found', null, 813);
|
||||
}
|
||||
|
||||
if (!$gtw->enabled) {
|
||||
@@ -1547,7 +1547,7 @@ class Service implements InjectionAwareInterface
|
||||
$invoice = $this->di['db']->findOne('Invoice', 'hash = :hash', [':hash' => $hash]);
|
||||
|
||||
if (!$invoice instanceof \Model_Invoice) {
|
||||
throw new \FOSSBilling\InformationException('Invoice not found');
|
||||
throw new InformationException('Invoice not found');
|
||||
}
|
||||
|
||||
$this->checkInvoiceAuth($invoice, InvoiceOperation::READ);
|
||||
|
||||
@@ -153,6 +153,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="id" value="{{ invoice.id }}">
|
||||
<input type="hidden" name="execute" value="1">
|
||||
<div class="d-flex flex-column gap-3">
|
||||
<div>
|
||||
<label class="form-label" for="transaction-id">{{ 'Transaction ID'|trans }}</label>
|
||||
|
||||
@@ -279,7 +279,7 @@ class Service implements \FOSSBilling\InjectionAwareInterface
|
||||
{
|
||||
$model = $this->getMessageRepository()->find((int) $params['msg_id']);
|
||||
if (!$model instanceof MassmailerMessage) {
|
||||
throw new \FOSSBilling\InformationException('Mass mail message not found');
|
||||
throw new InformationException('Mass mail message not found');
|
||||
}
|
||||
$this->sendMessage($model, (int) $params['client_id']);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user