Minor fixes

This commit is contained in:
David Bomba 2024-08-02 17:11:33 +10:00
parent fe891a4293
commit dfff937031
3 changed files with 6 additions and 5 deletions

View File

@ -94,7 +94,9 @@ class ProcessMailgunWebhook implements ShouldQueue
}
MultiDB::findAndSetDbByCompanyKey($this->request['event-data']['tags'][0]);
$company = Company::query()->where('company_key', $this->request['event-data']['tags'][0])->first();
/** @var \App\Models\Company $company */
$company = Company::where('company_key', $this->request['event-data']['tags'][0])->first();
if ($company && $this->request['event-data']['event'] == 'complained' && config('ninja.notification.slack')) {
$company->notification(new EmailSpamNotification($company))->ninja();
@ -195,7 +197,7 @@ class ProcessMailgunWebhook implements ShouldQueue
'date' => \Carbon\Carbon::parse($this->request['event-data']['timestamp'])->format('Y-m-d H:i:s') ?? '',
];
if($sl) {
if($sl instanceof SystemLog) {
$data = $sl->log;
$data['history']['events'][] = $event;
$this->updateSystemLog($sl, $data);

View File

@ -108,7 +108,7 @@ class PaymentMethod implements MethodInterface
return $this->rotessa->processInternallyFailedPayment($this->rotessa, new ClientPortalAuthorizationException( get_class( $e) . " : {$e->getMessage()}", (int) $e->getCode() ));
}
return back()->withMessage(ctrans('texts.unable_to_verify_payment_method'));
// return back()->withMessage(ctrans('texts.unable_to_verify_payment_method'));
}
/**
@ -134,7 +134,6 @@ class PaymentMethod implements MethodInterface
* Handle payments page for Rotessa.
*
* @param PaymentResponseRequest $request
* @return void
*/
public function paymentResponse(PaymentResponseRequest $request)
{

View File

@ -65,7 +65,7 @@ class RouteServiceProvider extends ServiceProvider
if (Ninja::isSelfHost()) {
return Limit::none();
} else {
return Limit::perMinute(300)->by($request->ip());
return Limit::perMinute(500)->by($request->ip());
}
});