diff --git a/app/PaymentDrivers/Mollie/CreditCard.php b/app/PaymentDrivers/Mollie/CreditCard.php
index 8a6af3dd2daf..1c96455d86ff 100644
--- a/app/PaymentDrivers/Mollie/CreditCard.php
+++ b/app/PaymentDrivers/Mollie/CreditCard.php
@@ -70,6 +70,12 @@ class CreditCard
'sequenceType' => 'recurring',
'description' => \sprintf('Hash: %s', $this->mollie->payment_hash->hash),
'webhookUrl' => $this->mollie->company_gateway->webhookUrl(),
+ 'metadata' => [
+ 'client_id' => $this->mollie->client->hashed_id,
+ 'hash' => $this->mollie->payment_hash->hash,
+ 'gateway_type_id' => GatewayType::CREDIT_CARD,
+ 'payment_type_id' => PaymentType::CREDIT_CARD_OTHER,
+ ],
]);
if ($payment->status === 'paid') {
@@ -106,6 +112,12 @@ class CreditCard
'hash' => $this->mollie->payment_hash->hash,
]),
'webhookUrl' => $this->mollie->company_gateway->webhookUrl(),
+ 'metadata' => [
+ 'client_id' => $this->mollie->client->hashed_id,
+ 'hash' => $this->mollie->payment_hash->hash,
+ 'gateway_type_id' => GatewayType::CREDIT_CARD,
+ 'payment_type_id' => PaymentType::CREDIT_CARD_OTHER,
+ ],
'cardToken' => $request->gateway_response,
];
diff --git a/app/Providers/MailServiceProvider.php b/app/Providers/MailServiceProvider.php
index cc16f654f77e..55f0b372908e 100644
--- a/app/Providers/MailServiceProvider.php
+++ b/app/Providers/MailServiceProvider.php
@@ -17,6 +17,7 @@ use Coconuts\Mail\PostmarkTransport;
use GuzzleHttp\Client as HttpClient;
use Illuminate\Mail\MailServiceProvider as MailProvider;
use Illuminate\Mail\TransportManager;
+use Illuminate\Container\Container;
class MailServiceProvider extends MailProvider
{
@@ -33,11 +34,17 @@ class MailServiceProvider extends MailProvider
protected function registerIlluminateMailer()
{
-
+ // //this is not octane safe
$this->app->singleton('mail.manager', function($app) {
return new GmailTransportManager($app);
});
+
+ //this is octane ready - but is untested
+ // $this->app->bind('mail.manager', function ($app){
+ // return new GmailTransportManager($app);
+ // });
+
$this->app->bind('mailer', function ($app) {
return $app->make('mail.manager')->mailer();
});
diff --git a/app/Providers/NinjaTranslationServiceProvider.php b/app/Providers/NinjaTranslationServiceProvider.php
index 985987bc0288..7054f32514d0 100644
--- a/app/Providers/NinjaTranslationServiceProvider.php
+++ b/app/Providers/NinjaTranslationServiceProvider.php
@@ -33,6 +33,7 @@ class NinjaTranslationServiceProvider extends TranslationServiceProvider
*
*/
+ //this is not octane safe
$this->app->singleton('translator', function ($app) {
$loader = $app['translation.loader'];
diff --git a/app/Services/Client/PaymentMethod.php b/app/Services/Client/PaymentMethod.php
index 4a18387d2215..f36fb2b2d3db 100644
--- a/app/Services/Client/PaymentMethod.php
+++ b/app/Services/Client/PaymentMethod.php
@@ -70,16 +70,16 @@ class PaymentMethod
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
- $this->gateways =
- CompanyGateway::with('gateway')
- ->where('company_id', $this->client->company_id)
+ $this->gateways = $this->client
+ ->company
+ ->company_gateways
->whereIn('id', $transformed_ids)
->where('is_deleted', false)
->whereNull('deleted_at')
->where('gateway_key', '!=', '54faab2ab6e3223dbe848b1686490baa')
->sortby(function ($model) use ($transformed_ids) { //company gateways are sorted in order of priority
return array_search($model->id, $transformed_ids);// this closure sorts for us
- })->get();
+ });
} else {
@@ -105,15 +105,16 @@ class PaymentMethod
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
- $this->gateways = CompanyGateway::with('gateway')
- ->where('company_id', $this->client->company_id)
+ $this->gateways = $this->client
+ ->company
+ ->company_gateways
->whereIn('id', $transformed_ids)
->where('is_deleted', false)
->whereNull('deleted_at')
->where('gateway_key', '54faab2ab6e3223dbe848b1686490baa')
->sortby(function ($model) use ($transformed_ids) { //company gateways are sorted in order of priority
return array_search($model->id, $transformed_ids);// this closure sorts for us
- })->get();
+ });
} else {
diff --git a/app/Utils/Helpers.php b/app/Utils/Helpers.php
index 6f633612e4f8..ca4a7e5d5b7f 100644
--- a/app/Utils/Helpers.php
+++ b/app/Utils/Helpers.php
@@ -262,9 +262,11 @@ class Helpers
}
}
- $x = str_replace(["\n", "
"], ["\r", "
"], $value);
+ return $value;
- return $x;
+ // $x = str_replace(["\n", "
"], ["\r", "
"], $value);
+
+ // return $x;
}
/**
diff --git a/app/Utils/SystemHealth.php b/app/Utils/SystemHealth.php
index b6ae0d3c880c..2b510d8c5c08 100644
--- a/app/Utils/SystemHealth.php
+++ b/app/Utils/SystemHealth.php
@@ -164,6 +164,8 @@ class SystemHealth
private static function extensions(): array
{
+ $loaded_extensions = null;
+
$loaded_extensions = [];
foreach (self::$extensions as $extension) {
diff --git a/resources/views/portal/ninja2020/auth/login.blade.php b/resources/views/portal/ninja2020/auth/login.blade.php
index 5fbc2a052730..44fdaf5d3975 100644
--- a/resources/views/portal/ninja2020/auth/login.blade.php
+++ b/resources/views/portal/ninja2020/auth/login.blade.php
@@ -26,7 +26,7 @@
@elseif(isset($company) && !is_null($company))