1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

requested fixes

This commit is contained in:
paulwer 2024-02-27 07:36:32 +01:00
parent 33560bd6a6
commit 5d676cb6de
2 changed files with 5 additions and 3 deletions

View File

@ -421,7 +421,7 @@ class ProcessBrevoWebhook implements ShouldQueue
public function getRawMessage(string $message_id)
{
$brevo_secret = $this->company->settings->brevo_secret ?? config('services.brevo.key');
$brevo_secret = isset($this->company->settings->brevo_secret) && trim($this->company->settings->brevo_secret) != '' ? $this->company->settings->brevo_secret : config('services.brevo.key');
$brevo = new TransactionalEmailsApi(null, Configuration::getDefaultConfiguration()->setApiKey('api-key', $brevo_secret));
$messageDetail = $brevo->getTransacEmailContent($message_id);

View File

@ -355,7 +355,9 @@ class ProcessPostmarkWebhook implements ShouldQueue
public function getRawMessage(string $message_id)
{
$postmark = new PostmarkClient(config('services.postmark.token'));
$postmark_secret = isset($this->company->settings->postmark_secret) && trim($this->company->settings->postmark_secret) != '' ? $this->company->settings->postmark_secret : config('services.postmark.token');
$postmark = new PostmarkClient($postmark_secret);
$messageDetail = $postmark->getOutboundMessageDetails($message_id);
return $messageDetail;
@ -386,7 +388,7 @@ class ProcessPostmarkWebhook implements ShouldQueue
try {
$postmark_secret = $this->company->settings->postmark_secret ?? config('services.postmark.token');
$postmark_secret = isset($this->company->settings->postmark_secret) && trim($this->company->settings->postmark_secret) != '' ? $this->company->settings->postmark_secret : config('services.postmark.token');
$postmark = new PostmarkClient($postmark_secret);
$messageDetail = $postmark->getOutboundMessageDetails($this->request['MessageID']);