diff --git a/app/PaymentDrivers/PayFastPaymentDriver.php b/app/PaymentDrivers/PayFastPaymentDriver.php index 707aabd999db..40fbaf00c33e 100644 --- a/app/PaymentDrivers/PayFastPaymentDriver.php +++ b/app/PaymentDrivers/PayFastPaymentDriver.php @@ -69,7 +69,7 @@ class PayFastPaymentDriver extends BaseDriver public function init() { try { - $this->payfast = new \PayFast\PayFastPayment( + $this->payfast = new \Payfast\PayFastPayment( [ 'merchantId' => $this->company_gateway->getConfigField('merchantId'), 'merchantKey' => $this->company_gateway->getConfigField('merchantKey'), diff --git a/app/Services/Pdf/PdfBuilder.php b/app/Services/Pdf/PdfBuilder.php index 32bc6dfba54e..8061c014bd6d 100644 --- a/app/Services/Pdf/PdfBuilder.php +++ b/app/Services/Pdf/PdfBuilder.php @@ -1166,8 +1166,7 @@ class PdfBuilder } elseif (Str::startsWith($variable, '$custom_surcharge')) { $_variable = ltrim($variable, '$'); // $custom_surcharge1 -> custom_surcharge1 - // $visible = intval($this->service->config->entity->{$_variable}) != 0; - $visible = intval(str_replace(['0','.'], '', $this->service->config->entity->{$_variable})) != 0; + $visible = intval(str_replace(['0','.'], '', ($this->service->config->entity->{$_variable} ?? ''))) != 0; $elements[1]['elements'][] = ['element' => 'div', 'elements' => [ ['element' => 'span', 'content' => $variable . '_label', 'properties' => ['hidden' => !$visible, 'data-ref' => 'totals_table-' . substr($variable, 1) . '-label']], @@ -1679,7 +1678,7 @@ class PdfBuilder if ($child['element'] !== 'script') { if ($this->service->company->markdown_enabled && array_key_exists('content', $child)) { - $child['content'] = str_replace('
', "\r", $child['content']); + $child['content'] = str_replace('
', "\r", ($child['content'] ?? '')); $child['content'] = $this->commonmark->convert($child['content'] ?? ''); } }