mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-14 11:44:40 -04:00
Merge branch 'v5-develop' of https://github.com/invoiceninja/invoiceninja into fix-nordigen-amount
This commit is contained in:
commit
cc59ee0b1f
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -43,7 +43,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git clone https://${{secrets.commit_secret}}@github.com/invoiceninja/ui.git
|
git clone https://${{secrets.commit_secret}}@github.com/invoiceninja/ui.git
|
||||||
cd ui
|
cd ui
|
||||||
git checkout main
|
git checkout develop
|
||||||
npm i
|
npm i
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
5.7.63
|
5.8.10
|
@ -100,6 +100,31 @@ class CreateSingleAccount extends Command
|
|||||||
$this->warmCache();
|
$this->warmCache();
|
||||||
|
|
||||||
$this->createSmallAccount();
|
$this->createSmallAccount();
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
$pdo = \DB::connection('ronin')->getPdo();
|
||||||
|
|
||||||
|
if(class_exists(\Modules\Ronin\app\Models\Admin::class)){
|
||||||
|
$this->info('Creating Ronin Account');
|
||||||
|
$this->createRoninAccount();
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function createRoninAccount()
|
||||||
|
{
|
||||||
|
$admin = \Modules\Ronin\app\Models\Admin::create([
|
||||||
|
'first_name' => 'small',
|
||||||
|
'last_name' => 'example',
|
||||||
|
'email' => 'small@example.com',
|
||||||
|
'password' => Hash::make('password'),
|
||||||
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createSmallAccount()
|
private function createSmallAccount()
|
||||||
|
@ -50,9 +50,9 @@ class S3Cleanup extends Command
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
if (!Ninja::isHosted()) {
|
// if (!Ninja::isHosted()) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
$c1 = Company::on('db-ninja-01')->pluck('company_key');
|
$c1 = Company::on('db-ninja-01')->pluck('company_key');
|
||||||
$c2 = Company::on('db-ninja-02')->pluck('company_key');
|
$c2 = Company::on('db-ninja-02')->pluck('company_key');
|
||||||
|
@ -58,6 +58,7 @@ class TranslationsExport extends Command
|
|||||||
'it',
|
'it',
|
||||||
'ja',
|
'ja',
|
||||||
'km_KH',
|
'km_KH',
|
||||||
|
'lo_LA',
|
||||||
'lt',
|
'lt',
|
||||||
'lv_LV',
|
'lv_LV',
|
||||||
'mk_MK',
|
'mk_MK',
|
||||||
|
@ -76,7 +76,7 @@ class Kernel extends ConsoleKernel
|
|||||||
/* Runs cleanup code for subscriptions */
|
/* Runs cleanup code for subscriptions */
|
||||||
$schedule->job(new SubscriptionCron)->dailyAt('00:01')->withoutOverlapping()->name('subscription-job')->onOneServer();
|
$schedule->job(new SubscriptionCron)->dailyAt('00:01')->withoutOverlapping()->name('subscription-job')->onOneServer();
|
||||||
|
|
||||||
/* Sends recurring invoices*/
|
/* Sends recurring expenses*/
|
||||||
$schedule->job(new RecurringExpensesCron)->dailyAt('00:10')->withoutOverlapping()->name('recurring-expense-job')->onOneServer();
|
$schedule->job(new RecurringExpensesCron)->dailyAt('00:10')->withoutOverlapping()->name('recurring-expense-job')->onOneServer();
|
||||||
|
|
||||||
/* Checks the status of the scheduler */
|
/* Checks the status of the scheduler */
|
||||||
|
@ -271,6 +271,9 @@ class Handler extends ExceptionHandler
|
|||||||
case 'vendor':
|
case 'vendor':
|
||||||
$login = 'vendor.catchall';
|
$login = 'vendor.catchall';
|
||||||
break;
|
break;
|
||||||
|
case 'ronin':
|
||||||
|
$login = 'ronin.login';
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$login = 'default';
|
$login = 'default';
|
||||||
break;
|
break;
|
||||||
|
@ -37,6 +37,7 @@ class ProductSalesExport extends BaseExport
|
|||||||
'product_key' => 'product_key',
|
'product_key' => 'product_key',
|
||||||
'notes' => 'notes',
|
'notes' => 'notes',
|
||||||
'quantity' => 'quantity',
|
'quantity' => 'quantity',
|
||||||
|
'currency' => 'currency',
|
||||||
'cost' => 'price',
|
'cost' => 'price',
|
||||||
'price' => 'cost',
|
'price' => 'cost',
|
||||||
'markup' => 'markup',
|
'markup' => 'markup',
|
||||||
@ -163,6 +164,7 @@ class ProductSalesExport extends BaseExport
|
|||||||
private function buildRow($invoice, $invoice_item) :array
|
private function buildRow($invoice, $invoice_item) :array
|
||||||
{
|
{
|
||||||
$transformed_entity = (array)$invoice_item;
|
$transformed_entity = (array)$invoice_item;
|
||||||
|
$transformed_entity['price'] = ($invoice_item->product_cost ?? 1 ) * ($invoice->exchange_rate ?? 1) ;
|
||||||
|
|
||||||
$entity = [];
|
$entity = [];
|
||||||
|
|
||||||
@ -171,6 +173,8 @@ class ProductSalesExport extends BaseExport
|
|||||||
|
|
||||||
if (array_key_exists($key, $transformed_entity)) {
|
if (array_key_exists($key, $transformed_entity)) {
|
||||||
$entity[$keyval] = $transformed_entity[$key];
|
$entity[$keyval] = $transformed_entity[$key];
|
||||||
|
} elseif($key == 'currency') {
|
||||||
|
$entity['currency'] = $invoice->client->currency()->code;
|
||||||
} else {
|
} else {
|
||||||
$entity[$keyval] = '';
|
$entity[$keyval] = '';
|
||||||
}
|
}
|
||||||
@ -184,9 +188,9 @@ class ProductSalesExport extends BaseExport
|
|||||||
|
|
||||||
private function decorateAdvancedFields(Invoice $invoice, $entity) :array
|
private function decorateAdvancedFields(Invoice $invoice, $entity) :array
|
||||||
{
|
{
|
||||||
$product = $this->getProduct($entity['product_key']);
|
|
||||||
|
//$product = $this->getProduct($entity['product_key']);
|
||||||
$entity['cost'] = $product->cost ?? 0;
|
// $entity['cost'] = $product->cost ?? 0;
|
||||||
/** @var float $unit_cost */
|
/** @var float $unit_cost */
|
||||||
$unit_cost = $entity['cost'] == 0 ? 1 : $entity['cost'];
|
$unit_cost = $entity['cost'] == 0 ? 1 : $entity['cost'];
|
||||||
|
|
||||||
|
@ -28,7 +28,8 @@ class CloneQuoteToInvoiceFactory
|
|||||||
unset($quote_array['invoice_id']);
|
unset($quote_array['invoice_id']);
|
||||||
unset($quote_array['id']);
|
unset($quote_array['id']);
|
||||||
unset($quote_array['invitations']);
|
unset($quote_array['invitations']);
|
||||||
|
unset($quote_array['user']);
|
||||||
|
|
||||||
//preserve terms if they exist on Quotes
|
//preserve terms if they exist on Quotes
|
||||||
//if(array_key_exists('terms', $quote_array) && strlen($quote_array['terms']) < 2)
|
//if(array_key_exists('terms', $quote_array) && strlen($quote_array['terms']) < 2)
|
||||||
if (! $quote->company->use_quote_terms_on_conversion) {
|
if (! $quote->company->use_quote_terms_on_conversion) {
|
||||||
@ -38,7 +39,6 @@ class CloneQuoteToInvoiceFactory
|
|||||||
// unset($quote_array['public_notes']);
|
// unset($quote_array['public_notes']);
|
||||||
unset($quote_array['footer']);
|
unset($quote_array['footer']);
|
||||||
unset($quote_array['design_id']);
|
unset($quote_array['design_id']);
|
||||||
unset($quote_array['user']);
|
|
||||||
|
|
||||||
foreach ($quote_array as $key => $value) {
|
foreach ($quote_array as $key => $value) {
|
||||||
$invoice->{$key} = $value;
|
$invoice->{$key} = $value;
|
||||||
@ -59,6 +59,7 @@ class CloneQuoteToInvoiceFactory
|
|||||||
$invoice->last_sent_date = null;
|
$invoice->last_sent_date = null;
|
||||||
$invoice->last_viewed = null;
|
$invoice->last_viewed = null;
|
||||||
|
|
||||||
|
|
||||||
return $invoice;
|
return $invoice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,6 +132,8 @@ class ClientFilters extends QueryFilters
|
|||||||
return $this->builder->where(function ($query) use ($filter) {
|
return $this->builder->where(function ($query) use ($filter) {
|
||||||
$query->where('name', 'like', '%'.$filter.'%')
|
$query->where('name', 'like', '%'.$filter.'%')
|
||||||
->orWhere('id_number', 'like', '%'.$filter.'%')
|
->orWhere('id_number', 'like', '%'.$filter.'%')
|
||||||
|
->orWhere('number', 'like', '%'.$filter.'%')
|
||||||
|
|
||||||
->orWhereHas('contacts', function ($query) use ($filter) {
|
->orWhereHas('contacts', function ($query) use ($filter) {
|
||||||
$query->where('first_name', 'like', '%'.$filter.'%');
|
$query->where('first_name', 'like', '%'.$filter.'%');
|
||||||
$query->orWhere('last_name', 'like', '%'.$filter.'%');
|
$query->orWhere('last_name', 'like', '%'.$filter.'%');
|
||||||
|
@ -36,6 +36,7 @@ class RecurringInvoiceFilters extends QueryFilters
|
|||||||
return $this->builder->where(function ($query) use ($filter) {
|
return $this->builder->where(function ($query) use ($filter) {
|
||||||
$query->where('date', 'like', '%'.$filter.'%')
|
$query->where('date', 'like', '%'.$filter.'%')
|
||||||
->orWhere('amount', 'like', '%'.$filter.'%')
|
->orWhere('amount', 'like', '%'.$filter.'%')
|
||||||
|
->orWhere('number', 'like', '%'.$filter.'%')
|
||||||
->orWhere('custom_value1', 'like', '%'.$filter.'%')
|
->orWhere('custom_value1', 'like', '%'.$filter.'%')
|
||||||
->orWhere('custom_value2', 'like', '%'.$filter.'%')
|
->orWhere('custom_value2', 'like', '%'.$filter.'%')
|
||||||
->orWhere('custom_value3', 'like', '%'.$filter.'%')
|
->orWhere('custom_value3', 'like', '%'.$filter.'%')
|
||||||
|
@ -66,21 +66,44 @@ class UserFilters extends QueryFilters
|
|||||||
*/
|
*/
|
||||||
public function entityFilter()
|
public function entityFilter()
|
||||||
{
|
{
|
||||||
return $this->builder->whereHas('company_users', function ($q) {
|
|
||||||
$q->where('company_id', '=', auth()->user()->company()->id);
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
return $this->builder->whereHas('company_users', function ($q) use ($user){
|
||||||
|
$q->where('company_id', '=', $user->company()->id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hides owner users from the list.
|
||||||
|
*
|
||||||
|
* @return Builder
|
||||||
|
*/
|
||||||
|
public function hideOwnerUsers(): Builder
|
||||||
|
{
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
return $this->builder->whereHas('company_users', function ($q) use ($user) {
|
||||||
|
$q->where('company_id', '=', $user->company()->id)->where('is_owner', false);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters users that have been removed from the
|
* Filters users that have been removed from the
|
||||||
* company, but not deleted from the system.
|
* company, but not deleted from the system.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return Builder
|
||||||
*/
|
*/
|
||||||
public function hideRemovedUsers()
|
public function hideRemovedUsers(): Builder
|
||||||
{
|
{
|
||||||
return $this->builder->whereHas('company_users', function ($q) {
|
/** @var \App\Models\User $user */
|
||||||
$q->where('company_id', '=', auth()->user()->company()->id)->whereNull('deleted_at');
|
$user = auth()->user();
|
||||||
|
|
||||||
|
return $this->builder->whereHas('company_users', function ($q) use ($user) {
|
||||||
|
$q->where('company_id', '=', $user->company()->id)->whereNull('deleted_at');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,12 +121,21 @@ class UserFilters extends QueryFilters
|
|||||||
return $this->builder;
|
return $this->builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
return $this->builder
|
return $this->builder
|
||||||
->orWhere($this->with_property, $value)
|
->orWhere($this->with_property, $value)
|
||||||
->orderByRaw("{$this->with_property} = ? DESC", [$value])
|
->orderByRaw("{$this->with_property} = ? DESC", [$value])
|
||||||
->where('account_id', auth()->user()->account_id);
|
->where('account_id', $user->account_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns users with permissions to send emails via OAuth
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @return Builder
|
||||||
|
*/
|
||||||
public function sending_users(string $value = ''): Builder
|
public function sending_users(string $value = ''): Builder
|
||||||
{
|
{
|
||||||
if (strlen($value) == 0 || $value != 'true') {
|
if (strlen($value) == 0 || $value != 'true') {
|
||||||
|
@ -19,8 +19,13 @@
|
|||||||
|
|
||||||
namespace App\Helpers\Bank\Nordigen;
|
namespace App\Helpers\Bank\Nordigen;
|
||||||
|
|
||||||
|
use App\Services\Email\Email;
|
||||||
|
use App\Models\BankIntegration;
|
||||||
|
use App\Services\Email\EmailObject;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
use App\Helpers\Bank\Nordigen\Transformer\AccountTransformer;
|
use App\Helpers\Bank\Nordigen\Transformer\AccountTransformer;
|
||||||
use App\Helpers\Bank\Nordigen\Transformer\TransactionTransformer;
|
use App\Helpers\Bank\Nordigen\Transformer\TransactionTransformer;
|
||||||
|
use Illuminate\Mail\Mailables\Address;
|
||||||
|
|
||||||
class Nordigen
|
class Nordigen
|
||||||
{
|
{
|
||||||
@ -39,7 +44,7 @@ class Nordigen
|
|||||||
|
|
||||||
$this->client = new \Nordigen\NordigenPHP\API\NordigenClient(config('ninja.nordigen.secret_id'), config('ninja.nordigen.secret_key'));
|
$this->client = new \Nordigen\NordigenPHP\API\NordigenClient(config('ninja.nordigen.secret_id'), config('ninja.nordigen.secret_key'));
|
||||||
|
|
||||||
$this->client->createAccessToken(); // access_token is valid 24h -> so we dont have to implement a refresh-cycle
|
$this->client->createAccessToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
// metadata-section for frontend
|
// metadata-section for frontend
|
||||||
@ -52,12 +57,12 @@ class Nordigen
|
|||||||
}
|
}
|
||||||
|
|
||||||
// requisition-section
|
// requisition-section
|
||||||
public function createRequisition(string $redirect, string $initutionId, string $reference)
|
public function createRequisition(string $redirect, string $initutionId, string $reference, string $userLanguage)
|
||||||
{
|
{
|
||||||
if ($this->test_mode && $initutionId != $this->sandbox_institutionId)
|
if ($this->test_mode && $initutionId != $this->sandbox_institutionId)
|
||||||
throw new \Exception('invalid institutionId while in test-mode');
|
throw new \Exception('invalid institutionId while in test-mode');
|
||||||
|
|
||||||
return $this->client->requisition->createRequisition($redirect, $initutionId, null, $reference);
|
return $this->client->requisition->createRequisition($redirect, $initutionId, null, $reference, $userLanguage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRequisition(string $requisitionId)
|
public function getRequisition(string $requisitionId)
|
||||||
@ -85,6 +90,7 @@ class Nordigen
|
|||||||
|
|
||||||
$it = new AccountTransformer();
|
$it = new AccountTransformer();
|
||||||
return $it->transform($out);
|
return $it->transform($out);
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
if (strpos($e->getMessage(), "Invalid Account ID") !== false)
|
if (strpos($e->getMessage(), "Invalid Account ID") !== false)
|
||||||
return false;
|
return false;
|
||||||
@ -92,8 +98,14 @@ class Nordigen
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isAccountActive(string $account_id)
|
/**
|
||||||
|
* isAccountActive
|
||||||
|
*
|
||||||
|
* @param string $account_id
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isAccountActive(string $account_id): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$account = $this->client->account($account_id)->getAccountMetaData();
|
$account = $this->client->account($account_id)->getAccountMetaData();
|
||||||
@ -112,15 +124,40 @@ class Nordigen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this method returns booked transactions from the bank_account, pending transactions are not part of the result
|
* getTransactions
|
||||||
* @todo @turbo124 should we include pending transactions within the integration-process and mark them with a specific category?!
|
*
|
||||||
|
* @param string $accountId
|
||||||
|
* @param string $dateFrom
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getTransactions(string $accountId, string $dateFrom = null)
|
public function getTransactions(string $accountId, string $dateFrom = null): array
|
||||||
{
|
{
|
||||||
$transactionResponse = $this->client->account($accountId)->getAccountTransactions($dateFrom);
|
$transactionResponse = $this->client->account($accountId)->getAccountTransactions($dateFrom);
|
||||||
|
|
||||||
$it = new TransactionTransformer();
|
$it = new TransactionTransformer();
|
||||||
return $it->transform($transactionResponse);
|
return $it->transform($transactionResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function disabledAccountEmail(BankIntegration $bank_integration): void
|
||||||
|
{
|
||||||
|
|
||||||
|
App::setLocale($bank_integration->company->getLocale());
|
||||||
|
|
||||||
|
$mo = new EmailObject();
|
||||||
|
$mo->subject = ctrans('texts.nordigen_requisition_subject');
|
||||||
|
$mo->body = ctrans('texts.nordigen_requisition_body');
|
||||||
|
$mo->text_body = ctrans('texts.nordigen_requisition_body');
|
||||||
|
$mo->company_key = $bank_integration->company->company_key;
|
||||||
|
$mo->html_template = 'email.template.generic';
|
||||||
|
$mo->to = [new Address($bank_integration->company->owner()->email, $bank_integration->company->owner()->present()->name())];
|
||||||
|
$mo->email_template_body = 'nordigen_requisition_body';
|
||||||
|
$mo->email_template_subject = 'nordigen_requisition_subject';
|
||||||
|
|
||||||
|
Email::dispatch($mo, $bank_integration->company);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -64,85 +64,85 @@ use Log;
|
|||||||
|
|
||||||
class TransactionTransformer implements BankRevenueInterface
|
class TransactionTransformer implements BankRevenueInterface
|
||||||
{
|
{
|
||||||
use AppSetup;
|
use AppSetup;
|
||||||
|
|
||||||
public function transform($transactionResponse)
|
public function transform($transactionResponse)
|
||||||
{
|
{
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
if (!array_key_exists('transactions', $transactionResponse) || !array_key_exists('booked', $transactionResponse["transactions"]))
|
if (!array_key_exists('transactions', $transactionResponse) || !array_key_exists('booked', $transactionResponse["transactions"]))
|
||||||
throw new \Exception('invalid dataset');
|
throw new \Exception('invalid dataset');
|
||||||
|
|
||||||
foreach ($transactionResponse["transactions"]["booked"] as $transaction) {
|
foreach ($transactionResponse["transactions"]["booked"] as $transaction) {
|
||||||
$data[] = $this->transformTransaction($transaction);
|
$data[] = $this->transformTransaction($transaction);
|
||||||
}
|
|
||||||
|
|
||||||
return $data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function transformTransaction($transaction)
|
return $data;
|
||||||
{
|
}
|
||||||
|
|
||||||
if (!array_key_exists('transactionId', $transaction) || !array_key_exists('transactionAmount', $transaction))
|
public function transformTransaction($transaction)
|
||||||
throw new \Exception('invalid dataset');
|
{
|
||||||
|
|
||||||
// description could be in varios places
|
if (!array_key_exists('transactionId', $transaction) || !array_key_exists('transactionAmount', $transaction))
|
||||||
$description = '';
|
throw new \Exception('invalid dataset');
|
||||||
if (array_key_exists('remittanceInformationStructured', $transaction))
|
|
||||||
$description = $transaction["remittanceInformationStructured"];
|
|
||||||
else if (array_key_exists('remittanceInformationStructuredArray', $transaction))
|
|
||||||
$description = implode('\n', $transaction["remittanceInformationStructuredArray"]);
|
|
||||||
else if (array_key_exists('remittanceInformationUnstructured', $transaction))
|
|
||||||
$description = $transaction["remittanceInformationUnstructured"];
|
|
||||||
else if (array_key_exists('remittanceInformationUnstructuredArray', $transaction))
|
|
||||||
$description = implode('\n', $transaction["remittanceInformationUnstructuredArray"]);
|
|
||||||
else
|
|
||||||
Log::warning("Missing description for the following transaction: " . json_encode($transaction));
|
|
||||||
|
|
||||||
// participant
|
// description could be in varios places
|
||||||
$participant = array_key_exists('debtorAccount', $transaction) && array_key_exists('iban', $transaction["debtorAccount"]) ?
|
$description = '';
|
||||||
$transaction['debtorAccount']['iban'] :
|
if (array_key_exists('remittanceInformationStructured', $transaction))
|
||||||
(array_key_exists('creditorAccount', $transaction) && array_key_exists('iban', $transaction["creditorAccount"]) ?
|
$description = $transaction["remittanceInformationStructured"];
|
||||||
$transaction['creditorAccount']['iban'] : null);
|
else if (array_key_exists('remittanceInformationStructuredArray', $transaction))
|
||||||
$participant_name = array_key_exists('debtorName', $transaction) ?
|
$description = implode('\n', $transaction["remittanceInformationStructuredArray"]);
|
||||||
$transaction['debtorName'] :
|
else if (array_key_exists('remittanceInformationUnstructured', $transaction))
|
||||||
(array_key_exists('creditorName', $transaction) ?
|
$description = $transaction["remittanceInformationUnstructured"];
|
||||||
$transaction['creditorName'] : null);
|
else if (array_key_exists('remittanceInformationUnstructuredArray', $transaction))
|
||||||
|
$description = implode('\n', $transaction["remittanceInformationUnstructuredArray"]);
|
||||||
|
else
|
||||||
|
Log::warning("Missing description for the following transaction: " . json_encode($transaction));
|
||||||
|
|
||||||
return [
|
// participant
|
||||||
'transaction_id' => $transaction["transactionId"],
|
$participant = array_key_exists('debtorAccount', $transaction) && array_key_exists('iban', $transaction["debtorAccount"]) ?
|
||||||
'amount' => (int) $transaction["transactionAmount"]["amount"],
|
$transaction['debtorAccount']['iban'] :
|
||||||
'currency_id' => $this->convertCurrency($transaction["transactionAmount"]["currency"]),
|
(array_key_exists('creditorAccount', $transaction) && array_key_exists('iban', $transaction["creditorAccount"]) ?
|
||||||
'category_id' => null, // nordigen has no categories
|
$transaction['creditorAccount']['iban'] : null);
|
||||||
'category_type' => array_key_exists('additionalInformation', $transaction) ? $transaction["additionalInformation"] : null, // TODO: institution specific keys like: GUTSCHRIFT, ABSCHLUSS, MONATSABSCHLUSS etc
|
$participant_name = array_key_exists('debtorName', $transaction) ?
|
||||||
'date' => $transaction["bookingDate"],
|
$transaction['debtorName'] :
|
||||||
'description' => $description,
|
(array_key_exists('creditorName', $transaction) ?
|
||||||
'participant' => $participant,
|
$transaction['creditorName'] : null);
|
||||||
'participant_name' => $participant_name,
|
|
||||||
'base_type' => (int) $transaction["transactionAmount"]["amount"] <= 0 ? 'DEBIT' : 'CREDIT',
|
|
||||||
];
|
|
||||||
|
|
||||||
|
return [
|
||||||
|
'transaction_id' => $transaction["transactionId"],
|
||||||
|
'amount' => (int) $transaction["transactionAmount"]["amount"],
|
||||||
|
'currency_id' => $this->convertCurrency($transaction["transactionAmount"]["currency"]),
|
||||||
|
'category_id' => null,
|
||||||
|
'category_type' => array_key_exists('additionalInformation', $transaction) ? $transaction["additionalInformation"] : '',
|
||||||
|
'date' => $transaction["bookingDate"],
|
||||||
|
'description' => $description,
|
||||||
|
'participant' => $participant,
|
||||||
|
'participant_name' => $participant_name,
|
||||||
|
'base_type' => (int) $transaction["transactionAmount"]["amount"] <= 0 ? 'DEBIT' : 'CREDIT',
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function convertCurrency(string $code)
|
||||||
|
{
|
||||||
|
|
||||||
|
$currencies = Cache::get('currencies');
|
||||||
|
|
||||||
|
if (!$currencies) {
|
||||||
|
$this->buildCache(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function convertCurrency(string $code)
|
$currency = $currencies->filter(function ($item) use ($code) {
|
||||||
{
|
return $item->code == $code;
|
||||||
|
})->first();
|
||||||
|
|
||||||
$currencies = Cache::get('currencies');
|
if ($currency)
|
||||||
|
return $currency->id;
|
||||||
|
|
||||||
if (!$currencies) {
|
return 1;
|
||||||
$this->buildCache(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
$currency = $currencies->filter(function ($item) use ($code) {
|
}
|
||||||
return $item->code == $code;
|
|
||||||
})->first();
|
|
||||||
|
|
||||||
if ($currency)
|
|
||||||
return $currency->id;
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
96
app/Helpers/Chorus/Piste.php
Normal file
96
app/Helpers/Chorus/Piste.php
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
|
*
|
||||||
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
|
*
|
||||||
|
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
|
||||||
|
*
|
||||||
|
* @license https://www.elastic.co/licensing/elastic-license
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Helpers\Chorus;
|
||||||
|
|
||||||
|
use Http;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Piste.
|
||||||
|
*/
|
||||||
|
class Piste
|
||||||
|
{
|
||||||
|
|
||||||
|
private string $oauth_sandbox_url = 'https://sandbox-oauth.piste.gouv.fr/api/oauth/token';
|
||||||
|
private string $oauth_production_url = 'https://oauth.piste.gouv.fr/api/oauth/token';
|
||||||
|
private string $sandbox_url = 'https://sandbox-api.piste.gouv.fr';
|
||||||
|
private string $production_url = 'https://api.piste.gouv.fr';
|
||||||
|
|
||||||
|
private bool $test_mode = false;
|
||||||
|
|
||||||
|
public function __construct(private string $username, private string $password)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setMode($testmode = true): self
|
||||||
|
{
|
||||||
|
$this->test_mode = $testmode;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function oauthHeaders(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'grant_type' => 'client_credentials',
|
||||||
|
'client_id' => config('services.chorus.client_id'),
|
||||||
|
'client_secret' => config('services.chorus.secret'),
|
||||||
|
'scope' => 'openid profile'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
private function oauthUrl(): string
|
||||||
|
{
|
||||||
|
return $this->test_mode ? $this->oauth_sandbox_url : $this->oauth_production_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function apiUrl(): string
|
||||||
|
{
|
||||||
|
return $this->test_mode ? $this->sandbox_url : $this->production_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getOauthAccessToken(): ?string
|
||||||
|
{
|
||||||
|
$response = Http::asForm()->post($this->oauthUrl(), $this->oauthHeaders());
|
||||||
|
|
||||||
|
if($response->successful()) {
|
||||||
|
return $response->json()['access_token'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function execute(string $uri, array $data = [])
|
||||||
|
{
|
||||||
|
$access_token = $this->getOauthAccessToken();
|
||||||
|
|
||||||
|
nlog($access_token);
|
||||||
|
nlog($this->username);
|
||||||
|
nlog($this->password);
|
||||||
|
nlog(base64_encode($this->username . ':' . $this->password));
|
||||||
|
|
||||||
|
$r = Http::withToken($access_token)
|
||||||
|
->withHeaders([
|
||||||
|
'cpro-account' => base64_encode($this->username . ':' . $this->password),
|
||||||
|
'Content-Type' => 'application/json;charset=utf-8',
|
||||||
|
'Accept' => 'application/json;charset=utf-8'
|
||||||
|
])
|
||||||
|
->post($this->apiUrl() . '/cpro/factures/'. $uri, $data);
|
||||||
|
|
||||||
|
nlog($r);
|
||||||
|
nlog($r->json());
|
||||||
|
nlog($r->successful());
|
||||||
|
nlog($r->body());
|
||||||
|
nlog($r->collect());
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -115,7 +115,7 @@ class SwissQrGenerator
|
|||||||
} else {
|
} else {
|
||||||
$tempInvoiceNumber = $this->invoice->number;
|
$tempInvoiceNumber = $this->invoice->number;
|
||||||
$tempInvoiceNumber = preg_replace('/[^A-Za-z0-9]/', '', $tempInvoiceNumber);
|
$tempInvoiceNumber = preg_replace('/[^A-Za-z0-9]/', '', $tempInvoiceNumber);
|
||||||
$tempInvoiceNumber = substr($tempInvoiceNumber, 1);
|
// $tempInvoiceNumber = substr($tempInvoiceNumber, 1);
|
||||||
|
|
||||||
$calcInvoiceNumber = "";
|
$calcInvoiceNumber = "";
|
||||||
$array = str_split($tempInvoiceNumber);
|
$array = str_split($tempInvoiceNumber);
|
||||||
|
@ -31,8 +31,11 @@ class NordigenController extends BaseController
|
|||||||
public function connect(ConnectNordigenBankIntegrationRequest $request)
|
public function connect(ConnectNordigenBankIntegrationRequest $request)
|
||||||
{
|
{
|
||||||
$data = $request->all();
|
$data = $request->all();
|
||||||
|
|
||||||
|
/** @var array $context */
|
||||||
$context = $request->getTokenContent();
|
$context = $request->getTokenContent();
|
||||||
$lang = $data['lang'] ?? 'en';
|
$company = $request->getCompany();
|
||||||
|
$lang = $company->locale();
|
||||||
$context["lang"] = $lang;
|
$context["lang"] = $lang;
|
||||||
|
|
||||||
if (!$context)
|
if (!$context)
|
||||||
@ -62,7 +65,7 @@ class NordigenController extends BaseController
|
|||||||
"redirectUrl" => $context["redirect"] . "?action=nordigen_connect&status=failed&reason=account-config-invalid",
|
"redirectUrl" => $context["redirect"] . "?action=nordigen_connect&status=failed&reason=account-config-invalid",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (!(Ninja::isSelfHost() || (Ninja::isHosted() && $account->isPaid() && $account->plan == 'enterprise')))
|
if (!(Ninja::isSelfHost() || (Ninja::isHosted() && $account->isEnterprisePaidClient())))
|
||||||
return view('bank.nordigen.handler', [
|
return view('bank.nordigen.handler', [
|
||||||
'lang' => $lang,
|
'lang' => $lang,
|
||||||
'company' => $company,
|
'company' => $company,
|
||||||
@ -85,7 +88,7 @@ class NordigenController extends BaseController
|
|||||||
|
|
||||||
// redirect to requisition flow
|
// redirect to requisition flow
|
||||||
try {
|
try {
|
||||||
$requisition = $nordigen->createRequisition(config('ninja.app_url') . '/nordigen/confirm', $data['institution_id'], $request->token);
|
$requisition = $nordigen->createRequisition(config('ninja.app_url') . '/nordigen/confirm', $data['institution_id'], $request->token, $lang);
|
||||||
} catch (NordigenException $e) { // TODO: property_exists returns null in these cases... => why => therefore we just get unknown error everytime $responseBody is typeof GuzzleHttp\Psr7\Stream
|
} catch (NordigenException $e) { // TODO: property_exists returns null in these cases... => why => therefore we just get unknown error everytime $responseBody is typeof GuzzleHttp\Psr7\Stream
|
||||||
$responseBody = (string) $e->getResponse()->getBody();
|
$responseBody = (string) $e->getResponse()->getBody();
|
||||||
|
|
||||||
@ -128,15 +131,19 @@ class NordigenController extends BaseController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* VIEW: Confirm Nordigen Bank Integration (redirect after nordigen flow)
|
* VIEW: Confirm Nordigen Bank Integration (redirect after nordigen flow)
|
||||||
* @param ConnectNordigenBankIntegrationRequest $request
|
* @param ConfirmNordigenBankIntegrationRequest $request
|
||||||
*/
|
*/
|
||||||
public function confirm(ConfirmNordigenBankIntegrationRequest $request)
|
public function confirm(ConfirmNordigenBankIntegrationRequest $request)
|
||||||
{
|
{
|
||||||
$data = $request->all();
|
$data = $request->all();
|
||||||
|
$company = $request->getCompany();
|
||||||
|
$account = $company->account;
|
||||||
|
$lang = $company->locale();
|
||||||
|
|
||||||
|
/** @var array $context */
|
||||||
$context = $request->getTokenContent();
|
$context = $request->getTokenContent();
|
||||||
if (!array_key_exists('lang', $data) && $context['lang'] != 'en')
|
if (!array_key_exists('lang', $data) && $context['lang'] != 'en')
|
||||||
return redirect()->route('nordigen.confirm', array_merge(["lang" => $context['lang']], $request->query())); // redirect is required in order for the bank-ui to display everything properly
|
return redirect()->route('nordigen.confirm', array_merge(["lang" => $context['lang']], $request->query()));
|
||||||
$lang = $data['lang'] ?? 'en';
|
|
||||||
|
|
||||||
if (!$context || $context["context"] != "nordigen" || !array_key_exists("requisitionId", $context))
|
if (!$context || $context["context"] != "nordigen" || !array_key_exists("requisitionId", $context))
|
||||||
return view('bank.nordigen.handler', [
|
return view('bank.nordigen.handler', [
|
||||||
@ -145,9 +152,6 @@ class NordigenController extends BaseController
|
|||||||
"redirectUrl" => ($context && array_key_exists("redirect", $context) ? $context["redirect"] : config('ninja.app_url')) . "?action=nordigen_connect&status=failed&reason=ref-invalid",
|
"redirectUrl" => ($context && array_key_exists("redirect", $context) ? $context["redirect"] : config('ninja.app_url')) . "?action=nordigen_connect&status=failed&reason=ref-invalid",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$company = $request->getCompany();
|
|
||||||
$account = $company->account;
|
|
||||||
|
|
||||||
if (!(config('ninja.nordigen.secret_id') && config('ninja.nordigen.secret_key')))
|
if (!(config('ninja.nordigen.secret_id') && config('ninja.nordigen.secret_key')))
|
||||||
return view('bank.nordigen.handler', [
|
return view('bank.nordigen.handler', [
|
||||||
'lang' => $lang,
|
'lang' => $lang,
|
||||||
@ -157,7 +161,7 @@ class NordigenController extends BaseController
|
|||||||
"redirectUrl" => $context["redirect"] . "?action=nordigen_connect&status=failed&reason=account-config-invalid",
|
"redirectUrl" => $context["redirect"] . "?action=nordigen_connect&status=failed&reason=account-config-invalid",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (!(Ninja::isSelfHost() || (Ninja::isHosted() && $account->isPaid() && $account->plan == 'enterprise')))
|
if (!(Ninja::isSelfHost() || (Ninja::isHosted() && $account->isEnterprisePaidClient())))
|
||||||
return view('bank.nordigen.handler', [
|
return view('bank.nordigen.handler', [
|
||||||
'lang' => $lang,
|
'lang' => $lang,
|
||||||
'company' => $company,
|
'company' => $company,
|
||||||
@ -202,7 +206,7 @@ class NordigenController extends BaseController
|
|||||||
|
|
||||||
$nordigen_account = $nordigen->getAccount($nordigenAccountId);
|
$nordigen_account = $nordigen->getAccount($nordigenAccountId);
|
||||||
|
|
||||||
$existing_bank_integration = BankIntegration::withTrashed()->where('nordigen_account_id', $nordigen_account['id'])->where('company_id', $company->id)->first();
|
$existing_bank_integration = BankIntegration::withTrashed()->where('nordigen_account_id', $nordigen_account['id'])->where('company_id', $company->id)->where('is_deleted', 0)->first();
|
||||||
|
|
||||||
if (!$existing_bank_integration) {
|
if (!$existing_bank_integration) {
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ class BankIntegrationController extends BaseController
|
|||||||
ProcessBankTransactionsYodlee::dispatch($user_account->id, $bank_integration);
|
ProcessBankTransactionsYodlee::dispatch($user_account->id, $bank_integration);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (config('ninja.nordigen.secret_id') && config('ninja.nordigen.secret_key') && (Ninja::isSelfHost() || (Ninja::isHosted() && $user_account->isPaid() && $user_account->plan == 'enterprise')))
|
if (config('ninja.nordigen.secret_id') && config('ninja.nordigen.secret_key') && (Ninja::isSelfHost() || (Ninja::isHosted() && $user_account->isEnterprisePaidClient())))
|
||||||
$user_account->bank_integrations->where("integration_type", BankIntegration::INTEGRATION_TYPE_NORDIGEN)->each(function ($bank_integration) {
|
$user_account->bank_integrations->where("integration_type", BankIntegration::INTEGRATION_TYPE_NORDIGEN)->each(function ($bank_integration) {
|
||||||
ProcessBankTransactionsNordigen::dispatch($bank_integration);
|
ProcessBankTransactionsNordigen::dispatch($bank_integration);
|
||||||
});
|
});
|
||||||
@ -298,11 +298,14 @@ class BankIntegrationController extends BaseController
|
|||||||
|
|
||||||
$account = $user->account;
|
$account = $user->account;
|
||||||
|
|
||||||
$bank_integration = BankIntegration::withTrashed()->where('bank_account_id', $acc_id)->orWhere('nordigen_account_id', $acc_id)->company()->firstOrFail(); // @turbo124 please check
|
$bank_integration = BankIntegration::withTrashed()
|
||||||
|
->where('bank_account_id', $acc_id)
|
||||||
|
->orWhere('nordigen_account_id', $acc_id)
|
||||||
|
->company()
|
||||||
|
->firstOrFail();
|
||||||
|
|
||||||
if ($bank_integration->integration_type == BankIntegration::INTEGRATION_TYPE_YODLEE)
|
if ($bank_integration->integration_type == BankIntegration::INTEGRATION_TYPE_YODLEE)
|
||||||
$this->removeAccountYodlee($account, $bank_integration);
|
$this->removeAccountYodlee($account, $bank_integration);
|
||||||
// we dont remove Accounts from nordigen, because they could be used within other companies
|
|
||||||
|
|
||||||
$this->bank_integration_repo->delete($bank_integration);
|
$this->bank_integration_repo->delete($bank_integration);
|
||||||
|
|
||||||
|
@ -605,7 +605,7 @@ class CreditController extends BaseController
|
|||||||
// code...
|
// code...
|
||||||
break;
|
break;
|
||||||
case 'mark_sent':
|
case 'mark_sent':
|
||||||
$credit->service()->markSent()->save();
|
$credit->service()->markSent(true)->save();
|
||||||
|
|
||||||
if (! $bulk) {
|
if (! $bulk) {
|
||||||
return $this->itemResponse($credit);
|
return $this->itemResponse($credit);
|
||||||
@ -646,7 +646,7 @@ class CreditController extends BaseController
|
|||||||
EmailEntity::dispatch($invitation, $credit->company, 'credit');
|
EmailEntity::dispatch($invitation, $credit->company, 'credit');
|
||||||
});
|
});
|
||||||
|
|
||||||
$credit->sendEvent(Webhook::EVENT_SENT_CREDIT, "client");
|
// $credit->sendEvent(Webhook::EVENT_SENT_CREDIT, "client");
|
||||||
|
|
||||||
if (! $bulk) {
|
if (! $bulk) {
|
||||||
return response()->json(['message'=>'email sent'], 200);
|
return response()->json(['message'=>'email sent'], 200);
|
||||||
|
@ -562,6 +562,16 @@ class InvoiceController extends BaseController
|
|||||||
return response()->json(['message' => $hash_or_response], 200);
|
return response()->json(['message' => $hash_or_response], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($action == 'set_payment_link' && $request->has('subscription_id')) {
|
||||||
|
|
||||||
|
$invoices->each(function ($invoice) use($user, $request){
|
||||||
|
if($user->can('edit', $invoice))
|
||||||
|
$invoice->service()->setPaymentLink($request->subscription_id)->save();
|
||||||
|
});
|
||||||
|
|
||||||
|
return $this->listResponse(Invoice::query()->withTrashed()->whereIn('id', $this->transformKeys($ids))->company());
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Send the other actions to the switch
|
* Send the other actions to the switch
|
||||||
*/
|
*/
|
||||||
|
@ -71,7 +71,6 @@ class PreviewController extends BaseController
|
|||||||
|
|
||||||
$ps = new PdfService($invitation, 'product', [
|
$ps = new PdfService($invitation, 'product', [
|
||||||
'client' => $client ?? false,
|
'client' => $client ?? false,
|
||||||
// 'vendor' => $vendor ?? false,
|
|
||||||
"{$entity_prop}s" => [$entity_obj],
|
"{$entity_prop}s" => [$entity_obj],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ class PreviewPurchaseOrderController extends BaseController
|
|||||||
$invitation->setRelation($request->entity, $entity_obj);
|
$invitation->setRelation($request->entity, $entity_obj);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$ps = new PdfService($invitation, 'purchase_order', [
|
$ps = new PdfService($invitation, 'purchase_order', [
|
||||||
'client' => $entity_obj->client ?? false,
|
'client' => $entity_obj->client ?? false,
|
||||||
'vendor' => $vendor ?? false,
|
'vendor' => $vendor ?? false,
|
||||||
|
@ -387,7 +387,6 @@ class RecurringInvoiceController extends BaseController
|
|||||||
|
|
||||||
$recurring_invoice->service()
|
$recurring_invoice->service()
|
||||||
->triggeredActions($request)
|
->triggeredActions($request)
|
||||||
// ->deletePdf()
|
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
event(new RecurringInvoiceWasUpdated($recurring_invoice, $recurring_invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
event(new RecurringInvoiceWasUpdated($recurring_invoice, $recurring_invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||||
@ -425,13 +424,26 @@ class RecurringInvoiceController extends BaseController
|
|||||||
|
|
||||||
$recurring_invoices = RecurringInvoice::withTrashed()->find($request->ids);
|
$recurring_invoices = RecurringInvoice::withTrashed()->find($request->ids);
|
||||||
|
|
||||||
|
|
||||||
|
if($request->action == 'set_payment_link' && $request->has('subscription_id')) {
|
||||||
|
|
||||||
|
$recurring_invoices->each(function ($invoice) use ($user, $request) {
|
||||||
|
if($user->can('edit', $invoice)) {
|
||||||
|
$invoice->service()->setPaymentLink($request->subscription_id)->save();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return $this->listResponse(RecurringInvoice::query()->withTrashed()->whereIn('id', $request->ids)->company());
|
||||||
|
}
|
||||||
|
|
||||||
$recurring_invoices->each(function ($recurring_invoice, $key) use ($request, $user) {
|
$recurring_invoices->each(function ($recurring_invoice, $key) use ($request, $user) {
|
||||||
if ($user->can('edit', $recurring_invoice)) {
|
if ($user->can('edit', $recurring_invoice)) {
|
||||||
$this->performAction($recurring_invoice, $request->action, true);
|
$this->performAction($recurring_invoice, $request->action, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return $this->listResponse(RecurringInvoice::withTrashed()->whereIn('id', $request->ids));
|
return $this->listResponse(RecurringInvoice::query()->withTrashed()->whereIn('id', $request->ids)->company());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,6 +56,7 @@ class Locale
|
|||||||
'bg',
|
'bg',
|
||||||
'he',
|
'he',
|
||||||
'km_KH',
|
'km_KH',
|
||||||
|
'lo_LA',
|
||||||
'hu',
|
'hu',
|
||||||
'fr_CH',
|
'fr_CH',
|
||||||
];
|
];
|
||||||
|
@ -58,6 +58,7 @@ class VendorLocale
|
|||||||
'km_KH',
|
'km_KH',
|
||||||
'hu',
|
'hu',
|
||||||
'fr_CH',
|
'fr_CH',
|
||||||
|
'lo_LA',
|
||||||
];
|
];
|
||||||
/**
|
/**
|
||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
|
@ -28,7 +28,8 @@ class BulkInvoiceRequest extends Request
|
|||||||
'email_type' => 'sometimes|in:reminder1,reminder2,reminder3,reminder_endless,custom1,custom2,custom3,invoice,quote,credit,payment,payment_partial,statement,purchase_order',
|
'email_type' => 'sometimes|in:reminder1,reminder2,reminder3,reminder_endless,custom1,custom2,custom3,invoice,quote,credit,payment,payment_partial,statement,purchase_order',
|
||||||
'template' => 'sometimes|string',
|
'template' => 'sometimes|string',
|
||||||
'template_id' => 'sometimes|string',
|
'template_id' => 'sometimes|string',
|
||||||
'send_email' => 'sometimes|bool'
|
'send_email' => 'sometimes|bool',
|
||||||
|
'subscriptin_id' => 'sometimes|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ class LoginRequest extends Request
|
|||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
if (Ninja::isHosted()) {
|
if (Ninja::isHosted()) {
|
||||||
$email_rules = ['required', new BlackListRule, new EmailBlackListRule];
|
$email_rules = ['required', new EmailBlackListRule];
|
||||||
} else {
|
} else {
|
||||||
$email_rules = 'required';
|
$email_rules = 'required';
|
||||||
}
|
}
|
||||||
|
@ -36,24 +36,19 @@ class ConnectNordigenBankIntegrationRequest extends Request
|
|||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'lang' => 'string',
|
|
||||||
'institution_id' => 'string',
|
|
||||||
'redirect' => 'string',
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// @turbo124 @todo please check for validity, when request from frontend
|
|
||||||
public function prepareForValidation()
|
public function prepareForValidation()
|
||||||
{
|
{
|
||||||
$input = $this->all();
|
$input = $this->all();
|
||||||
|
|
||||||
if (!array_key_exists('redirect', $input)) {
|
$context = $this->getTokenContent();
|
||||||
$context = $this->getTokenContent();
|
|
||||||
|
|
||||||
$input["redirect"] = isset($context["is_react"]) && $context['is_react'] ? config('ninja.react_url') . "/#/settings/bank_accounts" : config('ninja.app_url');
|
$input["redirect"] = isset($context["is_react"]) && $context['is_react'] ? config('ninja.react_url') . "/#/settings/bank_accounts" : config('ninja.app_url');
|
||||||
|
|
||||||
$this->replace($input);
|
$this->replace($input);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public function getTokenContent()
|
public function getTokenContent()
|
||||||
{
|
{
|
||||||
|
@ -58,7 +58,11 @@ class PreviewPurchaseOrderRequest extends Request
|
|||||||
$input['amount'] = 0;
|
$input['amount'] = 0;
|
||||||
$input['balance'] = 0;
|
$input['balance'] = 0;
|
||||||
$input['number'] = isset($input['number']) ? $input['number'] : ctrans('texts.live_preview').' #'.rand(0, 1000); //30-06-2023
|
$input['number'] = isset($input['number']) ? $input['number'] : ctrans('texts.live_preview').' #'.rand(0, 1000); //30-06-2023
|
||||||
|
|
||||||
|
if($input['entity_id'] ?? false) {
|
||||||
|
$input['entity_id'] = $this->decodePrimaryKey($input['entity_id'], true);
|
||||||
|
}
|
||||||
|
|
||||||
$this->replace($input);
|
$this->replace($input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,10 +31,14 @@ class BulkRecurringInvoiceRequest extends Request
|
|||||||
|
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'ids' => ['required','bail','array',Rule::exists('recurring_invoices', 'id')->where('company_id', auth()->user()->company()->id)],
|
'ids' => ['required','bail','array', Rule::exists('recurring_invoices', 'id')->where('company_id', $user->company()->id)],
|
||||||
'action' => 'in:archive,restore,delete,increase_prices,update_prices,start,stop,send_now',
|
'action' => 'in:archive,restore,delete,increase_prices,update_prices,start,stop,send_now,set_payment_link',
|
||||||
'percentage_increase' => 'required_if:action,increase_prices|numeric|min:0|max:100',
|
'percentage_increase' => 'required_if:action,increase_prices|numeric|min:0|max:100',
|
||||||
|
'subscription_id' => 'sometimes|string'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,14 +11,19 @@
|
|||||||
|
|
||||||
namespace App\Http\ValidationRules\Account;
|
namespace App\Http\ValidationRules\Account;
|
||||||
|
|
||||||
use Illuminate\Contracts\Validation\Rule;
|
use Closure;
|
||||||
|
use Illuminate\Contracts\Validation\ValidationRule;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BlackListRule.
|
* Class BlackListRule.
|
||||||
*/
|
*/
|
||||||
class BlackListRule implements Rule
|
class BlackListRule implements ValidationRule
|
||||||
{
|
{
|
||||||
|
/** Bad domains +/- dispoable email domains */
|
||||||
private array $blacklist = [
|
private array $blacklist = [
|
||||||
|
'secure-coinspot.com',
|
||||||
|
'casasotombo.com',
|
||||||
|
'otpku.com',
|
||||||
'ckptr.com',
|
'ckptr.com',
|
||||||
'pretreer.com',
|
'pretreer.com',
|
||||||
'candassociates.com',
|
'candassociates.com',
|
||||||
@ -57,6 +62,8 @@ class BlackListRule implements Rule
|
|||||||
'10dk.email',
|
'10dk.email',
|
||||||
'10mail.com',
|
'10mail.com',
|
||||||
'10mail.org',
|
'10mail.org',
|
||||||
|
'10mail.tk',
|
||||||
|
'10minmail.de',
|
||||||
'10minut.com.pl',
|
'10minut.com.pl',
|
||||||
'10minut.xyz',
|
'10minut.xyz',
|
||||||
'10minutemail.be',
|
'10minutemail.be',
|
||||||
@ -75,6 +82,7 @@ class BlackListRule implements Rule
|
|||||||
'10minutemailbox.com',
|
'10minutemailbox.com',
|
||||||
'10minutemails.in',
|
'10minutemails.in',
|
||||||
'10minutenemail.de',
|
'10minutenemail.de',
|
||||||
|
'10minutenmail.xyz',
|
||||||
'10minutesmail.com',
|
'10minutesmail.com',
|
||||||
'10minutesmail.fr',
|
'10minutesmail.fr',
|
||||||
'10minutmail.pl',
|
'10minutmail.pl',
|
||||||
@ -268,6 +276,7 @@ class BlackListRule implements Rule
|
|||||||
'affinitywe.us',
|
'affinitywe.us',
|
||||||
'affluentwe.us',
|
'affluentwe.us',
|
||||||
'affordablewe.us',
|
'affordablewe.us',
|
||||||
|
'afia.pro',
|
||||||
'afrobacon.com',
|
'afrobacon.com',
|
||||||
'afterhourswe.us',
|
'afterhourswe.us',
|
||||||
'agedmail.com',
|
'agedmail.com',
|
||||||
@ -287,6 +296,8 @@ class BlackListRule implements Rule
|
|||||||
'akapost.com',
|
'akapost.com',
|
||||||
'akerd.com',
|
'akerd.com',
|
||||||
'akgq701.com',
|
'akgq701.com',
|
||||||
|
'akmail.in',
|
||||||
|
'akugu.com',
|
||||||
'al-qaeda.us',
|
'al-qaeda.us',
|
||||||
'albionwe.us',
|
'albionwe.us',
|
||||||
'alchemywe.us',
|
'alchemywe.us',
|
||||||
@ -294,6 +305,7 @@ class BlackListRule implements Rule
|
|||||||
'aliaswe.us',
|
'aliaswe.us',
|
||||||
'alienware13.com',
|
'alienware13.com',
|
||||||
'aligamel.com',
|
'aligamel.com',
|
||||||
|
'alina-schiesser.ch',
|
||||||
'alisongamel.com',
|
'alisongamel.com',
|
||||||
'alivance.com',
|
'alivance.com',
|
||||||
'alivewe.us',
|
'alivewe.us',
|
||||||
@ -376,6 +388,7 @@ class BlackListRule implements Rule
|
|||||||
'antispam.de',
|
'antispam.de',
|
||||||
'antispam24.de',
|
'antispam24.de',
|
||||||
'antispammail.de',
|
'antispammail.de',
|
||||||
|
'any.pink',
|
||||||
'anyalias.com',
|
'anyalias.com',
|
||||||
'aoeuhtns.com',
|
'aoeuhtns.com',
|
||||||
'apfelkorps.de',
|
'apfelkorps.de',
|
||||||
@ -440,10 +453,12 @@ class BlackListRule implements Rule
|
|||||||
'badoop.com',
|
'badoop.com',
|
||||||
'badpotato.tk',
|
'badpotato.tk',
|
||||||
'balaket.com',
|
'balaket.com',
|
||||||
|
'bangban.uk',
|
||||||
'banit.club',
|
'banit.club',
|
||||||
'banit.me',
|
'banit.me',
|
||||||
'bank-opros1.ru',
|
'bank-opros1.ru',
|
||||||
'bareed.ws',
|
'bareed.ws',
|
||||||
|
'barooko.com',
|
||||||
'barryogorman.com',
|
'barryogorman.com',
|
||||||
'bartdevos.be',
|
'bartdevos.be',
|
||||||
'basscode.org',
|
'basscode.org',
|
||||||
@ -451,11 +466,15 @@ class BlackListRule implements Rule
|
|||||||
'bazaaboom.com',
|
'bazaaboom.com',
|
||||||
'bbbbyyzz.info',
|
'bbbbyyzz.info',
|
||||||
'bbhost.us',
|
'bbhost.us',
|
||||||
|
'bbitf.com',
|
||||||
|
'bbitj.com',
|
||||||
|
'bbitq.com',
|
||||||
'bcaoo.com',
|
'bcaoo.com',
|
||||||
'bcast.ws',
|
'bcast.ws',
|
||||||
'bcb.ro',
|
'bcb.ro',
|
||||||
'bccto.me',
|
'bccto.me',
|
||||||
'bdmuzic.pw',
|
'bdmuzic.pw',
|
||||||
|
'beaconmessenger.com',
|
||||||
'bearsarefuzzy.com',
|
'bearsarefuzzy.com',
|
||||||
'beddly.com',
|
'beddly.com',
|
||||||
'beefmilk.com',
|
'beefmilk.com',
|
||||||
@ -477,6 +496,7 @@ class BlackListRule implements Rule
|
|||||||
'betr.co',
|
'betr.co',
|
||||||
'bgtmail.com',
|
'bgtmail.com',
|
||||||
'bgx.ro',
|
'bgx.ro',
|
||||||
|
'bheps.com',
|
||||||
'bidourlnks.com',
|
'bidourlnks.com',
|
||||||
'big1.us',
|
'big1.us',
|
||||||
'bigprofessor.so',
|
'bigprofessor.so',
|
||||||
@ -520,9 +540,11 @@ class BlackListRule implements Rule
|
|||||||
'bouncr.com',
|
'bouncr.com',
|
||||||
'boxformail.in',
|
'boxformail.in',
|
||||||
'boximail.com',
|
'boximail.com',
|
||||||
|
'boxmail.lol',
|
||||||
'boxomail.live',
|
'boxomail.live',
|
||||||
'boxtemp.com.br',
|
'boxtemp.com.br',
|
||||||
'bptfp.net',
|
'bptfp.net',
|
||||||
|
'brand-app.biz',
|
||||||
'brandallday.net',
|
'brandallday.net',
|
||||||
'brasx.org',
|
'brasx.org',
|
||||||
'breakthru.com',
|
'breakthru.com',
|
||||||
@ -543,8 +565,10 @@ class BlackListRule implements Rule
|
|||||||
'budaya-tionghoa.com',
|
'budaya-tionghoa.com',
|
||||||
'budayationghoa.com',
|
'budayationghoa.com',
|
||||||
'buffemail.com',
|
'buffemail.com',
|
||||||
|
'bugfoo.com',
|
||||||
'bugmenever.com',
|
'bugmenever.com',
|
||||||
'bugmenot.com',
|
'bugmenot.com',
|
||||||
|
'bukhariansiddur.com',
|
||||||
'bulrushpress.com',
|
'bulrushpress.com',
|
||||||
'bum.net',
|
'bum.net',
|
||||||
'bumpymail.com',
|
'bumpymail.com',
|
||||||
@ -582,6 +606,7 @@ class BlackListRule implements Rule
|
|||||||
'caseedu.tk',
|
'caseedu.tk',
|
||||||
'cashflow35.com',
|
'cashflow35.com',
|
||||||
'casualdx.com',
|
'casualdx.com',
|
||||||
|
'catgroup.uk',
|
||||||
'cavi.mx',
|
'cavi.mx',
|
||||||
'cbair.com',
|
'cbair.com',
|
||||||
'cbes.net',
|
'cbes.net',
|
||||||
@ -605,6 +630,7 @@ class BlackListRule implements Rule
|
|||||||
'cheaphub.net',
|
'cheaphub.net',
|
||||||
'cheatmail.de',
|
'cheatmail.de',
|
||||||
'chenbot.email',
|
'chenbot.email',
|
||||||
|
'chewydonut.com',
|
||||||
'chibakenma.ml',
|
'chibakenma.ml',
|
||||||
'chickenkiller.com',
|
'chickenkiller.com',
|
||||||
'chielo.com',
|
'chielo.com',
|
||||||
@ -621,6 +647,7 @@ class BlackListRule implements Rule
|
|||||||
'chong-mail.org',
|
'chong-mail.org',
|
||||||
'chumpstakingdumps.com',
|
'chumpstakingdumps.com',
|
||||||
'cigar-auctions.com',
|
'cigar-auctions.com',
|
||||||
|
'civikli.com',
|
||||||
'civx.org',
|
'civx.org',
|
||||||
'ckaazaza.tk',
|
'ckaazaza.tk',
|
||||||
'ckiso.com',
|
'ckiso.com',
|
||||||
@ -637,6 +664,7 @@ class BlackListRule implements Rule
|
|||||||
'clonemoi.tk',
|
'clonemoi.tk',
|
||||||
'cloud-mail.top',
|
'cloud-mail.top',
|
||||||
'cloudns.cx',
|
'cloudns.cx',
|
||||||
|
'clout.wiki',
|
||||||
'clrmail.com',
|
'clrmail.com',
|
||||||
'cmail.club',
|
'cmail.club',
|
||||||
'cmail.com',
|
'cmail.com',
|
||||||
@ -678,6 +706,7 @@ class BlackListRule implements Rule
|
|||||||
'crazymailing.com',
|
'crazymailing.com',
|
||||||
'cream.pink',
|
'cream.pink',
|
||||||
'crepeau12.com',
|
'crepeau12.com',
|
||||||
|
'cringemonster.com',
|
||||||
'cross-law.ga',
|
'cross-law.ga',
|
||||||
'cross-law.gq',
|
'cross-law.gq',
|
||||||
'crossmailjet.com',
|
'crossmailjet.com',
|
||||||
@ -733,6 +762,7 @@ class BlackListRule implements Rule
|
|||||||
'daymailonline.com',
|
'daymailonline.com',
|
||||||
'dayrep.com',
|
'dayrep.com',
|
||||||
'dbunker.com',
|
'dbunker.com',
|
||||||
|
'dcctb.com',
|
||||||
'dcemail.com',
|
'dcemail.com',
|
||||||
'ddcrew.com',
|
'ddcrew.com',
|
||||||
'de-a.org',
|
'de-a.org',
|
||||||
@ -769,6 +799,7 @@ class BlackListRule implements Rule
|
|||||||
'dev-null.ga',
|
'dev-null.ga',
|
||||||
'dev-null.gq',
|
'dev-null.gq',
|
||||||
'dev-null.ml',
|
'dev-null.ml',
|
||||||
|
'developermail.com',
|
||||||
'devnullmail.com',
|
'devnullmail.com',
|
||||||
'deyom.com',
|
'deyom.com',
|
||||||
'dharmatel.net',
|
'dharmatel.net',
|
||||||
@ -800,6 +831,7 @@ class BlackListRule implements Rule
|
|||||||
'discardmail.com',
|
'discardmail.com',
|
||||||
'discardmail.de',
|
'discardmail.de',
|
||||||
'discos4.com',
|
'discos4.com',
|
||||||
|
'dishcatfish.com',
|
||||||
'disign-concept.eu',
|
'disign-concept.eu',
|
||||||
'disign-revelation.com',
|
'disign-revelation.com',
|
||||||
'dispo.in',
|
'dispo.in',
|
||||||
@ -851,10 +883,12 @@ class BlackListRule implements Rule
|
|||||||
'domforfb8.tk',
|
'domforfb8.tk',
|
||||||
'domforfb9.tk',
|
'domforfb9.tk',
|
||||||
'domozmail.com',
|
'domozmail.com',
|
||||||
|
'donebyngle.com',
|
||||||
'donemail.ru',
|
'donemail.ru',
|
||||||
'dongqing365.com',
|
'dongqing365.com',
|
||||||
'dontreg.com',
|
'dontreg.com',
|
||||||
'dontsendmespam.de',
|
'dontsendmespam.de',
|
||||||
|
'doojazz.com',
|
||||||
'doquier.tk',
|
'doquier.tk',
|
||||||
'dotman.de',
|
'dotman.de',
|
||||||
'dotmsg.com',
|
'dotmsg.com',
|
||||||
@ -869,13 +903,17 @@ class BlackListRule implements Rule
|
|||||||
'dred.ru',
|
'dred.ru',
|
||||||
'drevo.si',
|
'drevo.si',
|
||||||
'drivetagdev.com',
|
'drivetagdev.com',
|
||||||
|
'drmail.in',
|
||||||
'droolingfanboy.de',
|
'droolingfanboy.de',
|
||||||
'dropcake.de',
|
'dropcake.de',
|
||||||
'dropjar.com',
|
'dropjar.com',
|
||||||
'droplar.com',
|
'droplar.com',
|
||||||
'dropmail.me',
|
'dropmail.me',
|
||||||
'dropsin.net',
|
'dropsin.net',
|
||||||
|
'drowblock.com',
|
||||||
|
'dsgvo.party',
|
||||||
'dsgvo.ru',
|
'dsgvo.ru',
|
||||||
|
'dshfjdafd.cloud',
|
||||||
'dsiay.com',
|
'dsiay.com',
|
||||||
'dspwebservices.com',
|
'dspwebservices.com',
|
||||||
'duam.net',
|
'duam.net',
|
||||||
@ -944,6 +982,7 @@ class BlackListRule implements Rule
|
|||||||
'emailage.ml',
|
'emailage.ml',
|
||||||
'emailage.tk',
|
'emailage.tk',
|
||||||
'emailate.com',
|
'emailate.com',
|
||||||
|
'emailbin.net',
|
||||||
'emailcu.icu',
|
'emailcu.icu',
|
||||||
'emaildienst.de',
|
'emaildienst.de',
|
||||||
'emaildrop.io',
|
'emaildrop.io',
|
||||||
@ -1017,8 +1056,11 @@ class BlackListRule implements Rule
|
|||||||
'eposta.buzz',
|
'eposta.buzz',
|
||||||
'eposta.work',
|
'eposta.work',
|
||||||
'eqiluxspam.ga',
|
'eqiluxspam.ga',
|
||||||
|
'ereplyzy.com',
|
||||||
'ericjohnson.ml',
|
'ericjohnson.ml',
|
||||||
|
'eripo.net',
|
||||||
'ero-tube.org',
|
'ero-tube.org',
|
||||||
|
'esadverse.com',
|
||||||
'esbano-ru.ru',
|
'esbano-ru.ru',
|
||||||
'esc.la',
|
'esc.la',
|
||||||
'escapehatchapp.com',
|
'escapehatchapp.com',
|
||||||
@ -1043,16 +1085,19 @@ class BlackListRule implements Rule
|
|||||||
'evopo.com',
|
'evopo.com',
|
||||||
'evyush.com',
|
'evyush.com',
|
||||||
'exdonuts.com',
|
'exdonuts.com',
|
||||||
|
'exelica.com',
|
||||||
'existiert.net',
|
'existiert.net',
|
||||||
'exitstageleft.net',
|
'exitstageleft.net',
|
||||||
'explodemail.com',
|
'explodemail.com',
|
||||||
'express.net.ua',
|
'express.net.ua',
|
||||||
|
'extracurricularsociety.com',
|
||||||
'extremail.ru',
|
'extremail.ru',
|
||||||
'eyepaste.com',
|
'eyepaste.com',
|
||||||
'ez.lv',
|
'ez.lv',
|
||||||
'ezehe.com',
|
'ezehe.com',
|
||||||
'ezfill.com',
|
'ezfill.com',
|
||||||
'ezstest.com',
|
'ezstest.com',
|
||||||
|
'ezztt.com',
|
||||||
'f4k.es',
|
'f4k.es',
|
||||||
'f5.si',
|
'f5.si',
|
||||||
'facebook-email.cf',
|
'facebook-email.cf',
|
||||||
@ -1108,12 +1153,14 @@ class BlackListRule implements Rule
|
|||||||
'fbma.tk',
|
'fbma.tk',
|
||||||
'fddns.ml',
|
'fddns.ml',
|
||||||
'fdfdsfds.com',
|
'fdfdsfds.com',
|
||||||
|
'femailtor.com',
|
||||||
'fer-gabon.org',
|
'fer-gabon.org',
|
||||||
'fermaxxi.ru',
|
'fermaxxi.ru',
|
||||||
'fettometern.com',
|
'fettometern.com',
|
||||||
'fexbox.org',
|
'fexbox.org',
|
||||||
'fexbox.ru',
|
'fexbox.ru',
|
||||||
'fexpost.com',
|
'fexpost.com',
|
||||||
|
'fextemp.com',
|
||||||
'ficken.de',
|
'ficken.de',
|
||||||
'fictionsite.com',
|
'fictionsite.com',
|
||||||
'fightallspam.com',
|
'fightallspam.com',
|
||||||
@ -1127,6 +1174,7 @@ class BlackListRule implements Rule
|
|||||||
'filzmail.com',
|
'filzmail.com',
|
||||||
'findemail.info',
|
'findemail.info',
|
||||||
'findu.pl',
|
'findu.pl',
|
||||||
|
'finews.biz',
|
||||||
'fir.hk',
|
'fir.hk',
|
||||||
'firemailbox.club',
|
'firemailbox.club',
|
||||||
'fitnesrezink.ru',
|
'fitnesrezink.ru',
|
||||||
@ -1135,12 +1183,14 @@ class BlackListRule implements Rule
|
|||||||
'fizmail.com',
|
'fizmail.com',
|
||||||
'fleckens.hu',
|
'fleckens.hu',
|
||||||
'flemail.ru',
|
'flemail.ru',
|
||||||
|
'fliegender.fish',
|
||||||
'flowu.com',
|
'flowu.com',
|
||||||
'flu.cc',
|
'flu.cc',
|
||||||
'fluidsoft.us',
|
'fluidsoft.us',
|
||||||
'flurred.com',
|
'flurred.com',
|
||||||
'fly-ts.de',
|
'fly-ts.de',
|
||||||
'flyinggeek.net',
|
'flyinggeek.net',
|
||||||
|
'flymail.tk',
|
||||||
'flyspam.com',
|
'flyspam.com',
|
||||||
'foobarbot.net',
|
'foobarbot.net',
|
||||||
'footard.com',
|
'footard.com',
|
||||||
@ -1158,6 +1208,7 @@ class BlackListRule implements Rule
|
|||||||
'fosil.pro',
|
'fosil.pro',
|
||||||
'foxja.com',
|
'foxja.com',
|
||||||
'foxtrotter.info',
|
'foxtrotter.info',
|
||||||
|
'fr.cr',
|
||||||
'fr.nf',
|
'fr.nf',
|
||||||
'fr33mail.info',
|
'fr33mail.info',
|
||||||
'fragolina2.tk',
|
'fragolina2.tk',
|
||||||
@ -1204,11 +1255,15 @@ class BlackListRule implements Rule
|
|||||||
'fuirio.com',
|
'fuirio.com',
|
||||||
'fukaru.com',
|
'fukaru.com',
|
||||||
'fukurou.ch',
|
'fukurou.ch',
|
||||||
|
'fullangle.org',
|
||||||
'fulvie.com',
|
'fulvie.com',
|
||||||
'fun64.com',
|
'fun64.com',
|
||||||
'funnycodesnippets.com',
|
'funnycodesnippets.com',
|
||||||
'funnymail.de',
|
'funnymail.de',
|
||||||
'furzauflunge.de',
|
'furzauflunge.de',
|
||||||
|
'futuramind.com',
|
||||||
|
'fuwa.be',
|
||||||
|
'fuwa.li',
|
||||||
'fuwamofu.com',
|
'fuwamofu.com',
|
||||||
'fuwari.be',
|
'fuwari.be',
|
||||||
'fux0ringduh.com',
|
'fux0ringduh.com',
|
||||||
@ -1291,6 +1346,7 @@ class BlackListRule implements Rule
|
|||||||
'giveh2o.info',
|
'giveh2o.info',
|
||||||
'givememail.club',
|
'givememail.club',
|
||||||
'givmail.com',
|
'givmail.com',
|
||||||
|
'gixenmixen.com',
|
||||||
'glitch.sx',
|
'glitch.sx',
|
||||||
'globaltouron.com',
|
'globaltouron.com',
|
||||||
'glubex.com',
|
'glubex.com',
|
||||||
@ -1304,6 +1360,7 @@ class BlackListRule implements Rule
|
|||||||
'gnctr-calgary.com',
|
'gnctr-calgary.com',
|
||||||
'go2usa.info',
|
'go2usa.info',
|
||||||
'go2vpn.net',
|
'go2vpn.net',
|
||||||
|
'goatmail.uk',
|
||||||
'goemailgo.com',
|
'goemailgo.com',
|
||||||
'golemico.com',
|
'golemico.com',
|
||||||
'gomail.in',
|
'gomail.in',
|
||||||
@ -1363,6 +1420,7 @@ class BlackListRule implements Rule
|
|||||||
'guerrillamail.net',
|
'guerrillamail.net',
|
||||||
'guerrillamail.org',
|
'guerrillamail.org',
|
||||||
'guerrillamailblock.com',
|
'guerrillamailblock.com',
|
||||||
|
'gufum.com',
|
||||||
'gustr.com',
|
'gustr.com',
|
||||||
'gxemail.men',
|
'gxemail.men',
|
||||||
'gynzi.co.uk',
|
'gynzi.co.uk',
|
||||||
@ -1389,6 +1447,7 @@ class BlackListRule implements Rule
|
|||||||
'haltospam.com',
|
'haltospam.com',
|
||||||
'hamham.uk',
|
'hamham.uk',
|
||||||
'hangxomcuatoilatotoro.ml',
|
'hangxomcuatoilatotoro.ml',
|
||||||
|
'happy2023year.com',
|
||||||
'happydomik.ru',
|
'happydomik.ru',
|
||||||
'harakirimail.com',
|
'harakirimail.com',
|
||||||
'haribu.com',
|
'haribu.com',
|
||||||
@ -1467,6 +1526,7 @@ class BlackListRule implements Rule
|
|||||||
'huskion.net',
|
'huskion.net',
|
||||||
'hvastudiesucces.nl',
|
'hvastudiesucces.nl',
|
||||||
'hwsye.net',
|
'hwsye.net',
|
||||||
|
'hypenated-domain.com',
|
||||||
'i2pmail.org',
|
'i2pmail.org',
|
||||||
'i6.cloudns.cc',
|
'i6.cloudns.cc',
|
||||||
'iaoss.com',
|
'iaoss.com',
|
||||||
@ -1476,6 +1536,7 @@ class BlackListRule implements Rule
|
|||||||
'ichigo.me',
|
'ichigo.me',
|
||||||
'icx.in',
|
'icx.in',
|
||||||
'icx.ro',
|
'icx.ro',
|
||||||
|
'icznn.com',
|
||||||
'idx4.com',
|
'idx4.com',
|
||||||
'idxue.com',
|
'idxue.com',
|
||||||
'ieatspam.eu',
|
'ieatspam.eu',
|
||||||
@ -1498,9 +1559,12 @@ class BlackListRule implements Rule
|
|||||||
'imgof.com',
|
'imgof.com',
|
||||||
'imgv.de',
|
'imgv.de',
|
||||||
'immo-gerance.info',
|
'immo-gerance.info',
|
||||||
|
'imperialcnk.com',
|
||||||
'imstations.com',
|
'imstations.com',
|
||||||
'imul.info',
|
'imul.info',
|
||||||
'in-ulm.de',
|
'in-ulm.de',
|
||||||
|
'in2reach.com',
|
||||||
|
'inactivemachine.com',
|
||||||
'inbax.tk',
|
'inbax.tk',
|
||||||
'inbound.plus',
|
'inbound.plus',
|
||||||
'inbox.si',
|
'inbox.si',
|
||||||
@ -1530,6 +1594,7 @@ class BlackListRule implements Rule
|
|||||||
'ineec.net',
|
'ineec.net',
|
||||||
'infocom.zp.ua',
|
'infocom.zp.ua',
|
||||||
'inggo.org',
|
'inggo.org',
|
||||||
|
'inkiny.com',
|
||||||
'inkomail.com',
|
'inkomail.com',
|
||||||
'inmynetwork.tk',
|
'inmynetwork.tk',
|
||||||
'inoutmail.de',
|
'inoutmail.de',
|
||||||
@ -1540,12 +1605,16 @@ class BlackListRule implements Rule
|
|||||||
'insanumingeniumhomebrew.com',
|
'insanumingeniumhomebrew.com',
|
||||||
'insorg-mail.info',
|
'insorg-mail.info',
|
||||||
'instaddr.ch',
|
'instaddr.ch',
|
||||||
|
'instaddr.uk',
|
||||||
|
'instaddr.win',
|
||||||
'instance-email.com',
|
'instance-email.com',
|
||||||
'instant-mail.de',
|
'instant-mail.de',
|
||||||
'instantblingmail.info',
|
'instantblingmail.info',
|
||||||
'instantemailaddress.com',
|
'instantemailaddress.com',
|
||||||
'instantmail.fr',
|
'instantmail.fr',
|
||||||
|
'instmail.uk',
|
||||||
'internet-v-stavropole.ru',
|
'internet-v-stavropole.ru',
|
||||||
|
'internetkeno.com',
|
||||||
'internetoftags.com',
|
'internetoftags.com',
|
||||||
'interstats.org',
|
'interstats.org',
|
||||||
'intersteller.com',
|
'intersteller.com',
|
||||||
@ -1577,6 +1646,7 @@ class BlackListRule implements Rule
|
|||||||
'italy-mail.com',
|
'italy-mail.com',
|
||||||
'itcompu.com',
|
'itcompu.com',
|
||||||
'itfast.net',
|
'itfast.net',
|
||||||
|
'itsjiff.com',
|
||||||
'itunesgiftcodegenerator.com',
|
'itunesgiftcodegenerator.com',
|
||||||
'iubridge.com',
|
'iubridge.com',
|
||||||
'iuemail.men',
|
'iuemail.men',
|
||||||
@ -1585,6 +1655,7 @@ class BlackListRule implements Rule
|
|||||||
'ixx.io',
|
'ixx.io',
|
||||||
'j-p.us',
|
'j-p.us',
|
||||||
'jafps.com',
|
'jafps.com',
|
||||||
|
'jaga.email',
|
||||||
'jajxz.com',
|
'jajxz.com',
|
||||||
'janproz.com',
|
'janproz.com',
|
||||||
'jaqis.com',
|
'jaqis.com',
|
||||||
@ -1599,11 +1670,15 @@ class BlackListRule implements Rule
|
|||||||
'jetable.net',
|
'jetable.net',
|
||||||
'jetable.org',
|
'jetable.org',
|
||||||
'jetable.pp.ua',
|
'jetable.pp.ua',
|
||||||
|
'ji5.de',
|
||||||
|
'ji6.de',
|
||||||
|
'ji7.de',
|
||||||
'jiooq.com',
|
'jiooq.com',
|
||||||
'jmail.ovh',
|
'jmail.ovh',
|
||||||
'jmail.ro',
|
'jmail.ro',
|
||||||
'jnxjn.com',
|
'jnxjn.com',
|
||||||
'jobbikszimpatizans.hu',
|
'jobbikszimpatizans.hu',
|
||||||
|
'jobbrett.com',
|
||||||
'jobposts.net',
|
'jobposts.net',
|
||||||
'jobs-to-be-done.net',
|
'jobs-to-be-done.net',
|
||||||
'joelpet.com',
|
'joelpet.com',
|
||||||
@ -1660,6 +1735,8 @@ class BlackListRule implements Rule
|
|||||||
'killmail.com',
|
'killmail.com',
|
||||||
'killmail.net',
|
'killmail.net',
|
||||||
'kimsdisk.com',
|
'kimsdisk.com',
|
||||||
|
'kinda.email',
|
||||||
|
'kindamail.com',
|
||||||
'kingsq.ga',
|
'kingsq.ga',
|
||||||
'kino-100.ru',
|
'kino-100.ru',
|
||||||
'kiois.com',
|
'kiois.com',
|
||||||
@ -1668,16 +1745,20 @@ class BlackListRule implements Rule
|
|||||||
'kitnastar.com',
|
'kitnastar.com',
|
||||||
'kjkszpjcompany.com',
|
'kjkszpjcompany.com',
|
||||||
'kkmail.be',
|
'kkmail.be',
|
||||||
|
'kkoup.com',
|
||||||
'kksm.be',
|
'kksm.be',
|
||||||
'klassmaster.com',
|
'klassmaster.com',
|
||||||
'klassmaster.net',
|
'klassmaster.net',
|
||||||
'klick-tipp.us',
|
'klick-tipp.us',
|
||||||
'klipschx12.com',
|
'klipschx12.com',
|
||||||
'kloap.com',
|
'kloap.com',
|
||||||
|
'klovenode.com',
|
||||||
'kludgemush.com',
|
'kludgemush.com',
|
||||||
'klzlk.com',
|
'klzlk.com',
|
||||||
'kmail.li',
|
'kmail.li',
|
||||||
|
'kmail.live',
|
||||||
'kmhow.com',
|
'kmhow.com',
|
||||||
|
'knickerbockerban.de',
|
||||||
'knol-power.nl',
|
'knol-power.nl',
|
||||||
'kobrandly.com',
|
'kobrandly.com',
|
||||||
'kommunity.biz',
|
'kommunity.biz',
|
||||||
@ -1711,6 +1792,7 @@ class BlackListRule implements Rule
|
|||||||
'kwilco.net',
|
'kwilco.net',
|
||||||
'kyal.pl',
|
'kyal.pl',
|
||||||
'kyois.com',
|
'kyois.com',
|
||||||
|
'kzccv.com',
|
||||||
'l-c-a.us',
|
'l-c-a.us',
|
||||||
'l33r.eu',
|
'l33r.eu',
|
||||||
'l6factors.com',
|
'l6factors.com',
|
||||||
@ -1725,9 +1807,12 @@ class BlackListRule implements Rule
|
|||||||
'lak.pp.ua',
|
'lak.pp.ua',
|
||||||
'lakelivingstonrealestate.com',
|
'lakelivingstonrealestate.com',
|
||||||
'lakqs.com',
|
'lakqs.com',
|
||||||
|
'lamasticots.com',
|
||||||
|
'lambsauce.de',
|
||||||
'landmail.co',
|
'landmail.co',
|
||||||
'laoeq.com',
|
'laoeq.com',
|
||||||
'larisia.com',
|
'larisia.com',
|
||||||
|
'larland.com',
|
||||||
'last-chance.pro',
|
'last-chance.pro',
|
||||||
'lastmail.co',
|
'lastmail.co',
|
||||||
'lastmail.com',
|
'lastmail.com',
|
||||||
@ -1757,6 +1842,7 @@ class BlackListRule implements Rule
|
|||||||
'ligsb.com',
|
'ligsb.com',
|
||||||
'lillemap.net',
|
'lillemap.net',
|
||||||
'lilo.me',
|
'lilo.me',
|
||||||
|
'lilspam.com',
|
||||||
'lindenbaumjapan.com',
|
'lindenbaumjapan.com',
|
||||||
'link2mail.net',
|
'link2mail.net',
|
||||||
'linkedintuts2016.pw',
|
'linkedintuts2016.pw',
|
||||||
@ -1802,6 +1888,8 @@ class BlackListRule implements Rule
|
|||||||
'lukop.dk',
|
'lukop.dk',
|
||||||
'luv2.us',
|
'luv2.us',
|
||||||
'lyfestylecreditsolutions.com',
|
'lyfestylecreditsolutions.com',
|
||||||
|
'lyft.live',
|
||||||
|
'lyricspad.net',
|
||||||
'lzoaq.com',
|
'lzoaq.com',
|
||||||
'm21.cc',
|
'm21.cc',
|
||||||
'm4ilweb.info',
|
'm4ilweb.info',
|
||||||
@ -1847,6 +1935,7 @@ class BlackListRule implements Rule
|
|||||||
'mailapp.top',
|
'mailapp.top',
|
||||||
'mailback.com',
|
'mailback.com',
|
||||||
'mailbidon.com',
|
'mailbidon.com',
|
||||||
|
'mailbiscuit.com',
|
||||||
'mailbiz.biz',
|
'mailbiz.biz',
|
||||||
'mailblocks.com',
|
'mailblocks.com',
|
||||||
'mailbox.in.ua',
|
'mailbox.in.ua',
|
||||||
@ -1876,6 +1965,7 @@ class BlackListRule implements Rule
|
|||||||
'mailed.ro',
|
'mailed.ro',
|
||||||
'maileimer.de',
|
'maileimer.de',
|
||||||
'maileme101.com',
|
'maileme101.com',
|
||||||
|
'mailers.edu.pl',
|
||||||
'mailexpire.com',
|
'mailexpire.com',
|
||||||
'mailf5.com',
|
'mailf5.com',
|
||||||
'mailfa.tk',
|
'mailfa.tk',
|
||||||
@ -1943,6 +2033,7 @@ class BlackListRule implements Rule
|
|||||||
'mailonaut.com',
|
'mailonaut.com',
|
||||||
'mailorc.com',
|
'mailorc.com',
|
||||||
'mailorg.org',
|
'mailorg.org',
|
||||||
|
'mailosaur.net',
|
||||||
'mailox.fun',
|
'mailox.fun',
|
||||||
'mailpick.biz',
|
'mailpick.biz',
|
||||||
'mailpluss.com',
|
'mailpluss.com',
|
||||||
@ -2006,18 +2097,22 @@ class BlackListRule implements Rule
|
|||||||
'mcache.net',
|
'mcache.net',
|
||||||
'mciek.com',
|
'mciek.com',
|
||||||
'mdhc.tk',
|
'mdhc.tk',
|
||||||
|
'mdz.email',
|
||||||
'meantinc.com',
|
'meantinc.com',
|
||||||
'mebelnu.info',
|
'mebelnu.info',
|
||||||
'mechanicalresumes.com',
|
'mechanicalresumes.com',
|
||||||
'medkabinet-uzi.ru',
|
'medkabinet-uzi.ru',
|
||||||
'meepsheep.eu',
|
'meepsheep.eu',
|
||||||
|
'meidecn.com',
|
||||||
'meinspamschutz.de',
|
'meinspamschutz.de',
|
||||||
'meltedbrownies.com',
|
'meltedbrownies.com',
|
||||||
'meltmail.com',
|
'meltmail.com',
|
||||||
'memsg.site',
|
'memsg.site',
|
||||||
'mentonit.net',
|
'mentonit.net',
|
||||||
'mepost.pw',
|
'mepost.pw',
|
||||||
|
'merepost.com',
|
||||||
'merry.pink',
|
'merry.pink',
|
||||||
|
'meruado.uk',
|
||||||
'messagebeamer.de',
|
'messagebeamer.de',
|
||||||
'messwiththebestdielikethe.rest',
|
'messwiththebestdielikethe.rest',
|
||||||
'metadownload.org',
|
'metadownload.org',
|
||||||
@ -2043,6 +2138,7 @@ class BlackListRule implements Rule
|
|||||||
'migumail.com',
|
'migumail.com',
|
||||||
'mihep.com',
|
'mihep.com',
|
||||||
'mijnhva.nl',
|
'mijnhva.nl',
|
||||||
|
'minimail.gq',
|
||||||
'ministry-of-silly-walks.de',
|
'ministry-of-silly-walks.de',
|
||||||
'minsmail.com',
|
'minsmail.com',
|
||||||
'mintemail.com',
|
'mintemail.com',
|
||||||
@ -2054,6 +2150,7 @@ class BlackListRule implements Rule
|
|||||||
'mjukglass.nu',
|
'mjukglass.nu',
|
||||||
'mkpfilm.com',
|
'mkpfilm.com',
|
||||||
'ml8.ca',
|
'ml8.ca',
|
||||||
|
'mliok.com',
|
||||||
'mm.my',
|
'mm.my',
|
||||||
'mm5.se',
|
'mm5.se',
|
||||||
'mnode.me',
|
'mnode.me',
|
||||||
@ -2109,6 +2206,7 @@ class BlackListRule implements Rule
|
|||||||
'mucincanon.com',
|
'mucincanon.com',
|
||||||
'muehlacker.tk',
|
'muehlacker.tk',
|
||||||
'muell.icu',
|
'muell.icu',
|
||||||
|
'muell.io',
|
||||||
'muell.monster',
|
'muell.monster',
|
||||||
'muell.xyz',
|
'muell.xyz',
|
||||||
'muellemail.com',
|
'muellemail.com',
|
||||||
@ -2128,16 +2226,19 @@ class BlackListRule implements Rule
|
|||||||
'mycleaninbox.net',
|
'mycleaninbox.net',
|
||||||
'mycorneroftheinter.net',
|
'mycorneroftheinter.net',
|
||||||
'myde.ml',
|
'myde.ml',
|
||||||
|
'mydefipet.live',
|
||||||
'mydemo.equipment',
|
'mydemo.equipment',
|
||||||
'myecho.es',
|
'myecho.es',
|
||||||
'myemailboxy.com',
|
'myemailboxy.com',
|
||||||
'mygeoweb.info',
|
'mygeoweb.info',
|
||||||
'myindohome.services',
|
'myindohome.services',
|
||||||
|
'myinfoinc.com',
|
||||||
'myinterserver.ml',
|
'myinterserver.ml',
|
||||||
'mykickassideas.com',
|
'mykickassideas.com',
|
||||||
'mymail-in.net',
|
'mymail-in.net',
|
||||||
'mymail90.com',
|
'mymail90.com',
|
||||||
'mymailoasis.com',
|
'mymailoasis.com',
|
||||||
|
'mymaily.lol',
|
||||||
'mynetstore.de',
|
'mynetstore.de',
|
||||||
'myopang.com',
|
'myopang.com',
|
||||||
'mypacks.net',
|
'mypacks.net',
|
||||||
@ -2171,10 +2272,12 @@ class BlackListRule implements Rule
|
|||||||
'naslazhdai.ru',
|
'naslazhdai.ru',
|
||||||
'nationalgardeningclub.com',
|
'nationalgardeningclub.com',
|
||||||
'nawmin.info',
|
'nawmin.info',
|
||||||
|
'naymedia.com',
|
||||||
'nbzmr.com',
|
'nbzmr.com',
|
||||||
'negated.com',
|
'negated.com',
|
||||||
'neko2.net',
|
'neko2.net',
|
||||||
'nekochan.fr',
|
'nekochan.fr',
|
||||||
|
'nekosan.uk',
|
||||||
'neomailbox.com',
|
'neomailbox.com',
|
||||||
'neotlozhniy-zaim.ru',
|
'neotlozhniy-zaim.ru',
|
||||||
'nepwk.com',
|
'nepwk.com',
|
||||||
@ -2263,6 +2366,7 @@ class BlackListRule implements Rule
|
|||||||
'nwytg.com',
|
'nwytg.com',
|
||||||
'nwytg.net',
|
'nwytg.net',
|
||||||
'ny7.me',
|
'ny7.me',
|
||||||
|
'nyasan.com',
|
||||||
'nypato.com',
|
'nypato.com',
|
||||||
'nyrmusic.com',
|
'nyrmusic.com',
|
||||||
'o2stk.org',
|
'o2stk.org',
|
||||||
@ -2280,6 +2384,7 @@ class BlackListRule implements Rule
|
|||||||
'oepia.com',
|
'oepia.com',
|
||||||
'oerpub.org',
|
'oerpub.org',
|
||||||
'offshore-proxies.net',
|
'offshore-proxies.net',
|
||||||
|
'ofisher.net',
|
||||||
'ohaaa.de',
|
'ohaaa.de',
|
||||||
'ohi.tw',
|
'ohi.tw',
|
||||||
'oida.icu',
|
'oida.icu',
|
||||||
@ -2305,6 +2410,7 @@ class BlackListRule implements Rule
|
|||||||
'onlatedotcom.info',
|
'onlatedotcom.info',
|
||||||
'online.ms',
|
'online.ms',
|
||||||
'onlineidea.info',
|
'onlineidea.info',
|
||||||
|
'onlyapp.net',
|
||||||
'onqin.com',
|
'onqin.com',
|
||||||
'ontyne.biz',
|
'ontyne.biz',
|
||||||
'oohioo.com',
|
'oohioo.com',
|
||||||
@ -2330,6 +2436,7 @@ class BlackListRule implements Rule
|
|||||||
'ourklips.com',
|
'ourklips.com',
|
||||||
'ourpreviewdomain.com',
|
'ourpreviewdomain.com',
|
||||||
'outlawspam.com',
|
'outlawspam.com',
|
||||||
|
'outlook.edu.pl',
|
||||||
'outmail.win',
|
'outmail.win',
|
||||||
'ovomail.co',
|
'ovomail.co',
|
||||||
'ovpn.to',
|
'ovpn.to',
|
||||||
@ -2337,6 +2444,7 @@ class BlackListRule implements Rule
|
|||||||
'owlpic.com',
|
'owlpic.com',
|
||||||
'ownsyou.de',
|
'ownsyou.de',
|
||||||
'oxopoha.com',
|
'oxopoha.com',
|
||||||
|
'ozatvn.com',
|
||||||
'ozyl.de',
|
'ozyl.de',
|
||||||
'p-banlis.ru',
|
'p-banlis.ru',
|
||||||
'p33.org',
|
'p33.org',
|
||||||
@ -2347,6 +2455,7 @@ class BlackListRule implements Rule
|
|||||||
'pagamenti.tk',
|
'pagamenti.tk',
|
||||||
'paharpurmim.ga',
|
'paharpurmim.ga',
|
||||||
'pakadebu.ga',
|
'pakadebu.ga',
|
||||||
|
'pamaweb.com',
|
||||||
'pancakemail.com',
|
'pancakemail.com',
|
||||||
'papierkorb.me',
|
'papierkorb.me',
|
||||||
'paplease.com',
|
'paplease.com',
|
||||||
@ -2384,6 +2493,8 @@ class BlackListRule implements Rule
|
|||||||
'pisls.com',
|
'pisls.com',
|
||||||
'pitaniezdorovie.ru',
|
'pitaniezdorovie.ru',
|
||||||
'pivo-bar.ru',
|
'pivo-bar.ru',
|
||||||
|
'pixiil.com',
|
||||||
|
'pizzajunk.com',
|
||||||
'pjjkp.com',
|
'pjjkp.com',
|
||||||
'placebomail10.com',
|
'placebomail10.com',
|
||||||
'pleasenoham.org',
|
'pleasenoham.org',
|
||||||
@ -2435,6 +2546,7 @@ class BlackListRule implements Rule
|
|||||||
'prin.be',
|
'prin.be',
|
||||||
'privacy.net',
|
'privacy.net',
|
||||||
'privatdemail.net',
|
'privatdemail.net',
|
||||||
|
'privmail.edu.pl',
|
||||||
'privy-mail.com',
|
'privy-mail.com',
|
||||||
'privy-mail.de',
|
'privy-mail.de',
|
||||||
'privymail.de',
|
'privymail.de',
|
||||||
@ -2454,6 +2566,7 @@ class BlackListRule implements Rule
|
|||||||
'prtz.eu',
|
'prtz.eu',
|
||||||
'psh.me',
|
'psh.me',
|
||||||
'psles.com',
|
'psles.com',
|
||||||
|
'psnator.com',
|
||||||
'psoxs.com',
|
'psoxs.com',
|
||||||
'puglieisi.com',
|
'puglieisi.com',
|
||||||
'puji.pro',
|
'puji.pro',
|
||||||
@ -2464,11 +2577,13 @@ class BlackListRule implements Rule
|
|||||||
'put2.net',
|
'put2.net',
|
||||||
'puttanamaiala.tk',
|
'puttanamaiala.tk',
|
||||||
'putthisinyourspamdatabase.com',
|
'putthisinyourspamdatabase.com',
|
||||||
|
'pwpwa.com',
|
||||||
'pwrby.com',
|
'pwrby.com',
|
||||||
'qasti.com',
|
'qasti.com',
|
||||||
'qbfree.us',
|
'qbfree.us',
|
||||||
'qc.to',
|
'qc.to',
|
||||||
'qibl.at',
|
'qibl.at',
|
||||||
|
'qiott.com',
|
||||||
'qipmail.net',
|
'qipmail.net',
|
||||||
'qiq.us',
|
'qiq.us',
|
||||||
'qisdo.com',
|
'qisdo.com',
|
||||||
@ -2485,6 +2600,7 @@ class BlackListRule implements Rule
|
|||||||
'quickinbox.com',
|
'quickinbox.com',
|
||||||
'quickmail.nl',
|
'quickmail.nl',
|
||||||
'quicksend.ch',
|
'quicksend.ch',
|
||||||
|
'quipas.com',
|
||||||
'ququb.com',
|
'ququb.com',
|
||||||
'qvy.me',
|
'qvy.me',
|
||||||
'qwickmail.com',
|
'qwickmail.com',
|
||||||
@ -2496,6 +2612,7 @@ class BlackListRule implements Rule
|
|||||||
'raetp9.com',
|
'raetp9.com',
|
||||||
'rainbowly.ml',
|
'rainbowly.ml',
|
||||||
'raketenmann.de',
|
'raketenmann.de',
|
||||||
|
'ramenmail.de',
|
||||||
'rancidhome.net',
|
'rancidhome.net',
|
||||||
'randomail.io',
|
'randomail.io',
|
||||||
'randomail.net',
|
'randomail.net',
|
||||||
@ -2512,6 +2629,7 @@ class BlackListRule implements Rule
|
|||||||
're-gister.com',
|
're-gister.com',
|
||||||
'reality-concept.club',
|
'reality-concept.club',
|
||||||
'reallymymail.com',
|
'reallymymail.com',
|
||||||
|
'realquickemail.com',
|
||||||
'realtyalerts.ca',
|
'realtyalerts.ca',
|
||||||
'rebates.stream',
|
'rebates.stream',
|
||||||
'receiveee.com',
|
'receiveee.com',
|
||||||
@ -2542,6 +2660,7 @@ class BlackListRule implements Rule
|
|||||||
'rippb.com',
|
'rippb.com',
|
||||||
'risingsuntouch.com',
|
'risingsuntouch.com',
|
||||||
'riski.cf',
|
'riski.cf',
|
||||||
|
'risu.be',
|
||||||
'rklips.com',
|
'rklips.com',
|
||||||
'rkomo.com',
|
'rkomo.com',
|
||||||
'rm2rf.com',
|
'rm2rf.com',
|
||||||
@ -2578,6 +2697,7 @@ class BlackListRule implements Rule
|
|||||||
's33db0x.com',
|
's33db0x.com',
|
||||||
'sabrestlouis.com',
|
'sabrestlouis.com',
|
||||||
'sackboii.com',
|
'sackboii.com',
|
||||||
|
'saeoil.com',
|
||||||
'safaat.cf',
|
'safaat.cf',
|
||||||
'safermail.info',
|
'safermail.info',
|
||||||
'safersignup.de',
|
'safersignup.de',
|
||||||
@ -2630,10 +2750,13 @@ class BlackListRule implements Rule
|
|||||||
'sexforswingers.com',
|
'sexforswingers.com',
|
||||||
'sexical.com',
|
'sexical.com',
|
||||||
'sexyalwasmi.top',
|
'sexyalwasmi.top',
|
||||||
|
'sfolkar.com',
|
||||||
'shadap.org',
|
'shadap.org',
|
||||||
'shalar.net',
|
'shalar.net',
|
||||||
'sharedmailbox.org',
|
'sharedmailbox.org',
|
||||||
|
'sharkfaces.com',
|
||||||
'sharklasers.com',
|
'sharklasers.com',
|
||||||
|
'shchiba.uk',
|
||||||
'sheryli.com',
|
'sheryli.com',
|
||||||
'shhmail.com',
|
'shhmail.com',
|
||||||
'shhuut.org',
|
'shhuut.org',
|
||||||
@ -2662,6 +2785,7 @@ class BlackListRule implements Rule
|
|||||||
'sify.com',
|
'sify.com',
|
||||||
'sika3.com',
|
'sika3.com',
|
||||||
'sikux.com',
|
'sikux.com',
|
||||||
|
'silenceofthespam.com',
|
||||||
'siliwangi.ga',
|
'siliwangi.ga',
|
||||||
'silvercoin.life',
|
'silvercoin.life',
|
||||||
'sim-simka.ru',
|
'sim-simka.ru',
|
||||||
@ -2681,6 +2805,7 @@ class BlackListRule implements Rule
|
|||||||
'skrx.tk',
|
'skrx.tk',
|
||||||
'sky-inbox.com',
|
'sky-inbox.com',
|
||||||
'sky-ts.de',
|
'sky-ts.de',
|
||||||
|
'skygazerhub.com',
|
||||||
'skyrt.de',
|
'skyrt.de',
|
||||||
'slapsfromlastnight.com',
|
'slapsfromlastnight.com',
|
||||||
'slaskpost.se',
|
'slaskpost.se',
|
||||||
@ -2698,6 +2823,7 @@ class BlackListRule implements Rule
|
|||||||
'smapfree24.eu',
|
'smapfree24.eu',
|
||||||
'smapfree24.info',
|
'smapfree24.info',
|
||||||
'smapfree24.org',
|
'smapfree24.org',
|
||||||
|
'smartnator.com',
|
||||||
'smarttalent.pw',
|
'smarttalent.pw',
|
||||||
'smashmail.de',
|
'smashmail.de',
|
||||||
'smellfear.com',
|
'smellfear.com',
|
||||||
@ -2705,12 +2831,14 @@ class BlackListRule implements Rule
|
|||||||
'smellypotato.tk',
|
'smellypotato.tk',
|
||||||
'smtp99.com',
|
'smtp99.com',
|
||||||
'smwg.info',
|
'smwg.info',
|
||||||
|
'snakebutt.com',
|
||||||
'snakemail.com',
|
'snakemail.com',
|
||||||
'snapwet.com',
|
'snapwet.com',
|
||||||
'sneakmail.de',
|
'sneakmail.de',
|
||||||
'snece.com',
|
'snece.com',
|
||||||
'social-mailer.tk',
|
'social-mailer.tk',
|
||||||
'socialfurry.org',
|
'socialfurry.org',
|
||||||
|
'sociallymediocre.com',
|
||||||
'sofia.re',
|
'sofia.re',
|
||||||
'sofimail.com',
|
'sofimail.com',
|
||||||
'sofort-mail.de',
|
'sofort-mail.de',
|
||||||
@ -2731,6 +2859,7 @@ class BlackListRule implements Rule
|
|||||||
'soodmail.com',
|
'soodmail.com',
|
||||||
'soodomail.com',
|
'soodomail.com',
|
||||||
'soodonims.com',
|
'soodonims.com',
|
||||||
|
'soombo.com',
|
||||||
'soon.it',
|
'soon.it',
|
||||||
'spacebazzar.ru',
|
'spacebazzar.ru',
|
||||||
'spam-be-gone.com',
|
'spam-be-gone.com',
|
||||||
@ -2763,6 +2892,7 @@ class BlackListRule implements Rule
|
|||||||
'spamday.com',
|
'spamday.com',
|
||||||
'spamdecoy.net',
|
'spamdecoy.net',
|
||||||
'spamex.com',
|
'spamex.com',
|
||||||
|
'spamfellas.com',
|
||||||
'spamfighter.cf',
|
'spamfighter.cf',
|
||||||
'spamfighter.ga',
|
'spamfighter.ga',
|
||||||
'spamfighter.gq',
|
'spamfighter.gq',
|
||||||
@ -2791,6 +2921,7 @@ class BlackListRule implements Rule
|
|||||||
'spamobox.com',
|
'spamobox.com',
|
||||||
'spamoff.de',
|
'spamoff.de',
|
||||||
'spamsalad.in',
|
'spamsalad.in',
|
||||||
|
'spamsandwich.com',
|
||||||
'spamslicer.com',
|
'spamslicer.com',
|
||||||
'spamsphere.com',
|
'spamsphere.com',
|
||||||
'spamspot.com',
|
'spamspot.com',
|
||||||
@ -2810,11 +2941,13 @@ class BlackListRule implements Rule
|
|||||||
'spikio.com',
|
'spikio.com',
|
||||||
'spindl-e.com',
|
'spindl-e.com',
|
||||||
'spoofmail.de',
|
'spoofmail.de',
|
||||||
|
'sportrid.com',
|
||||||
'spr.io',
|
'spr.io',
|
||||||
'spritzzone.de',
|
'spritzzone.de',
|
||||||
'spruzme.com',
|
'spruzme.com',
|
||||||
'spybox.de',
|
'spybox.de',
|
||||||
'spymail.com',
|
'spymail.com',
|
||||||
|
'spymail.one',
|
||||||
'squizzy.de',
|
'squizzy.de',
|
||||||
'squizzy.net',
|
'squizzy.net',
|
||||||
'sroff.com',
|
'sroff.com',
|
||||||
@ -2852,10 +2985,12 @@ class BlackListRule implements Rule
|
|||||||
'submic.com',
|
'submic.com',
|
||||||
'suburbanthug.com',
|
'suburbanthug.com',
|
||||||
'suckmyd.com',
|
'suckmyd.com',
|
||||||
|
'sudern.de',
|
||||||
'sueshaw.com',
|
'sueshaw.com',
|
||||||
'suexamplesb.com',
|
'suexamplesb.com',
|
||||||
'suioe.com',
|
'suioe.com',
|
||||||
'super-auswahl.de',
|
'super-auswahl.de',
|
||||||
|
'superblohey.com',
|
||||||
'supergreatmail.com',
|
'supergreatmail.com',
|
||||||
'supermailer.jp',
|
'supermailer.jp',
|
||||||
'superplatyna.com',
|
'superplatyna.com',
|
||||||
@ -2872,6 +3007,7 @@ class BlackListRule implements Rule
|
|||||||
'sweetxxx.de',
|
'sweetxxx.de',
|
||||||
'swift-mail.net',
|
'swift-mail.net',
|
||||||
'swift10minutemail.com',
|
'swift10minutemail.com',
|
||||||
|
'syinxun.com',
|
||||||
'sylvannet.com',
|
'sylvannet.com',
|
||||||
'symphonyresume.com',
|
'symphonyresume.com',
|
||||||
'syosetu.gq',
|
'syosetu.gq',
|
||||||
@ -2891,6 +3027,8 @@ class BlackListRule implements Rule
|
|||||||
'tastrg.com',
|
'tastrg.com',
|
||||||
'taukah.com',
|
'taukah.com',
|
||||||
'tb-on-line.net',
|
'tb-on-line.net',
|
||||||
|
'tcwlm.com',
|
||||||
|
'tcwlx.com',
|
||||||
'tdtda.com',
|
'tdtda.com',
|
||||||
'tech69.com',
|
'tech69.com',
|
||||||
'techblast.ch',
|
'techblast.ch',
|
||||||
@ -2901,6 +3039,7 @@ class BlackListRule implements Rule
|
|||||||
'teewars.org',
|
'teewars.org',
|
||||||
'tefl.ro',
|
'tefl.ro',
|
||||||
'telecomix.pl',
|
'telecomix.pl',
|
||||||
|
'teleg.eu',
|
||||||
'teleworm.com',
|
'teleworm.com',
|
||||||
'teleworm.us',
|
'teleworm.us',
|
||||||
'tellos.xyz',
|
'tellos.xyz',
|
||||||
@ -2965,6 +3104,7 @@ class BlackListRule implements Rule
|
|||||||
'thecloudindex.com',
|
'thecloudindex.com',
|
||||||
'thediamants.org',
|
'thediamants.org',
|
||||||
'thedirhq.info',
|
'thedirhq.info',
|
||||||
|
'theeyeoftruth.com',
|
||||||
'thejoker5.com',
|
'thejoker5.com',
|
||||||
'thelightningmail.net',
|
'thelightningmail.net',
|
||||||
'thelimestones.com',
|
'thelimestones.com',
|
||||||
@ -2974,6 +3114,7 @@ class BlackListRule implements Rule
|
|||||||
'thereddoors.online',
|
'thereddoors.online',
|
||||||
'theroyalweb.club',
|
'theroyalweb.club',
|
||||||
'thescrappermovie.com',
|
'thescrappermovie.com',
|
||||||
|
'thespamfather.com',
|
||||||
'theteastory.info',
|
'theteastory.info',
|
||||||
'thex.ro',
|
'thex.ro',
|
||||||
'thichanthit.com',
|
'thichanthit.com',
|
||||||
@ -3010,9 +3151,13 @@ class BlackListRule implements Rule
|
|||||||
'tkitc.de',
|
'tkitc.de',
|
||||||
'tlpn.org',
|
'tlpn.org',
|
||||||
'tmail.com',
|
'tmail.com',
|
||||||
|
'tmail.io',
|
||||||
'tmail.ws',
|
'tmail.ws',
|
||||||
|
'tmail3.com',
|
||||||
|
'tmail9.com',
|
||||||
'tmailinator.com',
|
'tmailinator.com',
|
||||||
'tmails.net',
|
'tmails.net',
|
||||||
|
'tmmbt.net',
|
||||||
'tmpbox.net',
|
'tmpbox.net',
|
||||||
'tmpemails.com',
|
'tmpemails.com',
|
||||||
'tmpeml.com',
|
'tmpeml.com',
|
||||||
@ -3020,6 +3165,7 @@ class BlackListRule implements Rule
|
|||||||
'tmpjr.me',
|
'tmpjr.me',
|
||||||
'tmpmail.net',
|
'tmpmail.net',
|
||||||
'tmpmail.org',
|
'tmpmail.org',
|
||||||
|
'tmpx.sa.com',
|
||||||
'toddsbighug.com',
|
'toddsbighug.com',
|
||||||
'tofeat.com',
|
'tofeat.com',
|
||||||
'toiea.com',
|
'toiea.com',
|
||||||
@ -3049,6 +3195,7 @@ class BlackListRule implements Rule
|
|||||||
'totoan.info',
|
'totoan.info',
|
||||||
'tourcc.com',
|
'tourcc.com',
|
||||||
'tp-qa-mail.com',
|
'tp-qa-mail.com',
|
||||||
|
'tpwlb.com',
|
||||||
'tqoai.com',
|
'tqoai.com',
|
||||||
'tqosi.com',
|
'tqosi.com',
|
||||||
'tradermail.info',
|
'tradermail.info',
|
||||||
@ -3097,6 +3244,7 @@ class BlackListRule implements Rule
|
|||||||
'trialmail.de',
|
'trialmail.de',
|
||||||
'trickmail.net',
|
'trickmail.net',
|
||||||
'trillianpro.com',
|
'trillianpro.com',
|
||||||
|
'triots.com',
|
||||||
'trixtrux1.ru',
|
'trixtrux1.ru',
|
||||||
'trollproject.com',
|
'trollproject.com',
|
||||||
'tropicalbass.info',
|
'tropicalbass.info',
|
||||||
@ -3112,6 +3260,7 @@ class BlackListRule implements Rule
|
|||||||
'turoid.com',
|
'turoid.com',
|
||||||
'turual.com',
|
'turual.com',
|
||||||
'turuma.com',
|
'turuma.com',
|
||||||
|
'tutuapp.bid',
|
||||||
'tvchd.com',
|
'tvchd.com',
|
||||||
'tverya.com',
|
'tverya.com',
|
||||||
'twinmail.de',
|
'twinmail.de',
|
||||||
@ -3150,6 +3299,7 @@ class BlackListRule implements Rule
|
|||||||
'unit7lahaina.com',
|
'unit7lahaina.com',
|
||||||
'unmail.ru',
|
'unmail.ru',
|
||||||
'uooos.com',
|
'uooos.com',
|
||||||
|
'uorak.com',
|
||||||
'upliftnow.com',
|
'upliftnow.com',
|
||||||
'uplipht.com',
|
'uplipht.com',
|
||||||
'uploadnolimit.com',
|
'uploadnolimit.com',
|
||||||
@ -3268,6 +3418,7 @@ class BlackListRule implements Rule
|
|||||||
'watchever.biz',
|
'watchever.biz',
|
||||||
'watchfull.net',
|
'watchfull.net',
|
||||||
'watchironman3onlinefreefullmovie.com',
|
'watchironman3onlinefreefullmovie.com',
|
||||||
|
'waterisgone.com',
|
||||||
'wazabi.club',
|
'wazabi.club',
|
||||||
'wbdev.tech',
|
'wbdev.tech',
|
||||||
'wbml.net',
|
'wbml.net',
|
||||||
@ -3307,6 +3458,7 @@ class BlackListRule implements Rule
|
|||||||
'wegwrfmail.de',
|
'wegwrfmail.de',
|
||||||
'wegwrfmail.net',
|
'wegwrfmail.net',
|
||||||
'wegwrfmail.org',
|
'wegwrfmail.org',
|
||||||
|
'weizixu.com',
|
||||||
'wekawa.com',
|
'wekawa.com',
|
||||||
'welikecookies.com',
|
'welikecookies.com',
|
||||||
'wellsfargocomcardholders.com',
|
'wellsfargocomcardholders.com',
|
||||||
@ -3316,6 +3468,7 @@ class BlackListRule implements Rule
|
|||||||
'wfgdfhj.tk',
|
'wfgdfhj.tk',
|
||||||
'wg0.com',
|
'wg0.com',
|
||||||
'wh4f.org',
|
'wh4f.org',
|
||||||
|
'whaaaaaaaaaat.com',
|
||||||
'whatiaas.com',
|
'whatiaas.com',
|
||||||
'whatifanalytics.com',
|
'whatifanalytics.com',
|
||||||
'whatpaas.com',
|
'whatpaas.com',
|
||||||
@ -3327,6 +3480,7 @@ class BlackListRule implements Rule
|
|||||||
'wickmail.net',
|
'wickmail.net',
|
||||||
'widaryanto.info',
|
'widaryanto.info',
|
||||||
'widget.gg',
|
'widget.gg',
|
||||||
|
'wiemei.com',
|
||||||
'wierie.tk',
|
'wierie.tk',
|
||||||
'wifimaple.com',
|
'wifimaple.com',
|
||||||
'wifioak.com',
|
'wifioak.com',
|
||||||
@ -3355,6 +3509,7 @@ class BlackListRule implements Rule
|
|||||||
'wudet.men',
|
'wudet.men',
|
||||||
'wuespdj.xyz',
|
'wuespdj.xyz',
|
||||||
'wupics.com',
|
'wupics.com',
|
||||||
|
'wuuvo.com',
|
||||||
'wuzup.net',
|
'wuzup.net',
|
||||||
'wuzupmail.net',
|
'wuzupmail.net',
|
||||||
'wwjmp.com',
|
'wwjmp.com',
|
||||||
@ -3387,6 +3542,9 @@ class BlackListRule implements Rule
|
|||||||
'xrap.de',
|
'xrap.de',
|
||||||
'xrho.com',
|
'xrho.com',
|
||||||
'xvx.us',
|
'xvx.us',
|
||||||
|
'xwaretech.com',
|
||||||
|
'xwaretech.info',
|
||||||
|
'xwaretech.net',
|
||||||
'xww.ro',
|
'xww.ro',
|
||||||
'xxhamsterxx.ga',
|
'xxhamsterxx.ga',
|
||||||
'xxi2.com',
|
'xxi2.com',
|
||||||
@ -3463,6 +3621,7 @@ class BlackListRule implements Rule
|
|||||||
'zebins.eu',
|
'zebins.eu',
|
||||||
'zehnminuten.de',
|
'zehnminuten.de',
|
||||||
'zehnminutenmail.de',
|
'zehnminutenmail.de',
|
||||||
|
'zemzar.net',
|
||||||
'zepp.dk',
|
'zepp.dk',
|
||||||
'zetmail.com',
|
'zetmail.com',
|
||||||
'zfymail.com',
|
'zfymail.com',
|
||||||
@ -3473,6 +3632,7 @@ class BlackListRule implements Rule
|
|||||||
'zhorachu.com',
|
'zhorachu.com',
|
||||||
'zik.dj',
|
'zik.dj',
|
||||||
'zipcad.com',
|
'zipcad.com',
|
||||||
|
'zipcatfish.com',
|
||||||
'zipo1.gq',
|
'zipo1.gq',
|
||||||
'zippymail.info',
|
'zippymail.info',
|
||||||
'zipsendtest.com',
|
'zipsendtest.com',
|
||||||
@ -3494,27 +3654,13 @@ class BlackListRule implements Rule
|
|||||||
'zzz.com',
|
'zzz.com',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||||
* @param string $attribute
|
|
||||||
* @param mixed $value
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function passes($attribute, $value): bool
|
|
||||||
{
|
{
|
||||||
$parts = explode("@", $value);
|
$parts = explode("@", $value);
|
||||||
|
|
||||||
if (is_array($parts)) {
|
if (is_array($parts) && in_array($parts[1], $this->blacklist)) {
|
||||||
return ! in_array($parts[1], $this->blacklist);
|
$fail('This domain is blacklisted, if you think this is in error, please email contact@invoiceninja.com');
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function message(): string
|
|
||||||
{
|
|
||||||
return 'This domain is blacklisted, if you think this is in error, please email contact@invoiceninja.com';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -11,32 +11,26 @@
|
|||||||
|
|
||||||
namespace App\Http\ValidationRules\Account;
|
namespace App\Http\ValidationRules\Account;
|
||||||
|
|
||||||
use Illuminate\Contracts\Validation\Rule;
|
use Closure;
|
||||||
|
use Illuminate\Contracts\Validation\ValidationRule;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class EmailBlackListRule.
|
* Class EmailBlackListRule.
|
||||||
*/
|
*/
|
||||||
class EmailBlackListRule implements Rule
|
class EmailBlackListRule implements ValidationRule
|
||||||
{
|
{
|
||||||
public array $blacklist = [
|
public array $blacklist = [
|
||||||
|
'noddy@invoiceninja.com',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $attribute
|
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||||
* @param mixed $value
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function passes($attribute, $value)
|
|
||||||
{
|
{
|
||||||
return ! in_array($value, $this->blacklist);
|
|
||||||
|
if (in_array($value, $this->blacklist)) {
|
||||||
|
$fail('This email address is blacklisted, if you think this is in error, please email contact@invoiceninja.com');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function message()
|
|
||||||
{
|
|
||||||
return 'This email address is blacklisted, if you think this is in error, please email contact@invoiceninja.com';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,8 @@ class BankTransactionMap
|
|||||||
9 => 'transaction.base_type',
|
9 => 'transaction.base_type',
|
||||||
10 => 'transaction.payment_type_Credit',
|
10 => 'transaction.payment_type_Credit',
|
||||||
11 => 'transaction.payment_type_Debit',
|
11 => 'transaction.payment_type_Debit',
|
||||||
|
12 => 'transaction.participant',
|
||||||
|
13 => 'transaction.participant_name',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,6 +48,8 @@ class BankTransactionMap
|
|||||||
9 => 'texts.type',
|
9 => 'texts.type',
|
||||||
10 => 'transaction.credit',
|
10 => 'transaction.credit',
|
||||||
11 => 'transaction.debit',
|
11 => 'transaction.debit',
|
||||||
|
12 => 'transaction.participant',
|
||||||
|
13 => 'transaction.participant_name',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,6 +140,10 @@ class BaseImport
|
|||||||
$delimiters = [',', '.', ';', '|'];
|
$delimiters = [',', '.', ';', '|'];
|
||||||
$bestDelimiter = ',';
|
$bestDelimiter = ',';
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|
||||||
|
// 10-01-2024 - A better way to resolve the csv file delimiter.
|
||||||
|
$csvfile = substr($csvfile, 0, strpos($csvfile, "\n"));
|
||||||
|
|
||||||
foreach ($delimiters as $delimiter) {
|
foreach ($delimiters as $delimiter) {
|
||||||
|
|
||||||
if (substr_count(strstr($csvfile, "\n", true), $delimiter) >= $count) {
|
if (substr_count(strstr($csvfile, "\n", true), $delimiter) >= $count) {
|
||||||
@ -162,7 +166,6 @@ class BaseImport
|
|||||||
|
|
||||||
private function groupTasks($csvData, $key)
|
private function groupTasks($csvData, $key)
|
||||||
{
|
{
|
||||||
nlog($csvData[0]);
|
|
||||||
|
|
||||||
if (! $key || !is_array($csvData) || count($csvData) == 0 || !isset($csvData[0]['task.number']) || empty($csvData[0]['task.number'])) {
|
if (! $key || !is_array($csvData) || count($csvData) == 0 || !isset($csvData[0]['task.number']) || empty($csvData[0]['task.number'])) {
|
||||||
return $csvData;
|
return $csvData;
|
||||||
|
@ -44,6 +44,8 @@ class BankTransformer extends BaseTransformer
|
|||||||
'updated_at' => $now,
|
'updated_at' => $now,
|
||||||
'company_id' => $this->company->id,
|
'company_id' => $this->company->id,
|
||||||
'user_id' => $this->company->owner()->id,
|
'user_id' => $this->company->owner()->id,
|
||||||
|
'participant' => $this->getString($transaction, 'transaction.participant'),
|
||||||
|
'participant_name' => $this->getString($transaction, 'transaction.participant_name'),
|
||||||
];
|
];
|
||||||
|
|
||||||
return $transformed;
|
return $transformed;
|
||||||
|
@ -316,7 +316,7 @@ class BaseTransformer
|
|||||||
{
|
{
|
||||||
if (array_key_exists($field, $data)) {
|
if (array_key_exists($field, $data)) {
|
||||||
//$number = preg_replace('/[^0-9-.]+/', '', $data[$field]);
|
//$number = preg_replace('/[^0-9-.]+/', '', $data[$field]);
|
||||||
return Number::parseStringFloat($data[$field]);
|
return Number::parseFloat($data[$field]);
|
||||||
} else {
|
} else {
|
||||||
//$number = 0;
|
//$number = 0;
|
||||||
return 0;
|
return 0;
|
||||||
@ -334,7 +334,7 @@ class BaseTransformer
|
|||||||
public function getFloatOrOne($data, $field)
|
public function getFloatOrOne($data, $field)
|
||||||
{
|
{
|
||||||
if (array_key_exists($field, $data)) {
|
if (array_key_exists($field, $data)) {
|
||||||
return Number::parseStringFloat($data[$field]) > 0 ? Number::parseStringFloat($data[$field]) : 1;
|
return Number::parseFloat($data[$field]) > 0 ? Number::parseFloat($data[$field]) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -35,7 +35,7 @@ class ProcessBankTransactionsNordigen implements ShouldQueue
|
|||||||
public Company $company;
|
public Company $company;
|
||||||
public Nordigen $nordigen;
|
public Nordigen $nordigen;
|
||||||
public $nordigen_account;
|
public $nordigen_account;
|
||||||
|
private bool $stop_loop = false;
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*/
|
*/
|
||||||
@ -114,6 +114,9 @@ class ProcessBankTransactionsNordigen implements ShouldQueue
|
|||||||
$this->stop_loop = false;
|
$this->stop_loop = false;
|
||||||
nlog("Nordigen: account inactive: " . $this->bank_integration->nordigen_account_id);
|
nlog("Nordigen: account inactive: " . $this->bank_integration->nordigen_account_id);
|
||||||
// @turbo124 @todo send email for expired account
|
// @turbo124 @todo send email for expired account
|
||||||
|
|
||||||
|
$this->nordigen->disabledAccountEmail($this->bank_integration);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,12 +158,13 @@ class ProcessBankTransactionsNordigen implements ShouldQueue
|
|||||||
|
|
||||||
foreach ($transactions as $transaction) {
|
foreach ($transactions as $transaction) {
|
||||||
|
|
||||||
if (BankTransaction::where('transaction_id', $transaction['transaction_id'])->where('company_id', $this->company->id)->where('bank_integration_id', $this->bank_integration->id)->withTrashed()->exists())
|
if (BankTransaction::where('nordigen_transaction_id', $transaction['nordigen_transaction_id'])->where('company_id', $this->company->id)->where('bank_integration_id', $this->bank_integration->id)->where('is_deleted', 0)->withTrashed()->exists())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
//this should be much faster to insert than using ::create()
|
//this should be much faster to insert than using ::create()
|
||||||
\DB::table('bank_transactions')->insert(
|
\DB::table('bank_transactions')->insert(
|
||||||
array_merge($transaction, [
|
array_merge($transaction, [
|
||||||
|
'transaction_id' => 0,
|
||||||
'company_id' => $this->company->id,
|
'company_id' => $this->company->id,
|
||||||
'user_id' => $user_id,
|
'user_id' => $user_id,
|
||||||
'bank_integration_id' => $this->bank_integration->id,
|
'bank_integration_id' => $this->bank_integration->id,
|
||||||
|
@ -162,7 +162,7 @@ class ProcessBankTransactionsYodlee implements ShouldQueue
|
|||||||
$now = now();
|
$now = now();
|
||||||
|
|
||||||
foreach ($transactions as $transaction) {
|
foreach ($transactions as $transaction) {
|
||||||
if (BankTransaction::query()->where('transaction_id', $transaction['transaction_id'])->where('company_id', $this->company->id)->where('bank_integration_id', $this->bank_integration->id)->withTrashed()->exists()) { // @turbo124 was not scoped to bank_integration_id => from my pov this should be present, because when an account was historized (is_deleted) a transaction can occur multiple (in the archived bank_integration and in the new one
|
if (BankTransaction::query()->where('transaction_id', $transaction['transaction_id'])->where('company_id', $this->company->id)->where('bank_integration_id', $this->bank_integration->id)->withTrashed()->exists()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ class CompanyExport implements ShouldQueue
|
|||||||
{
|
{
|
||||||
MultiDB::setDb($this->company->db);
|
MultiDB::setDb($this->company->db);
|
||||||
|
|
||||||
$this->company = Company::query()->where('company_key', $this->company->company_key)->first();
|
// $this->company = Company::query()->where('company_key', $this->company->company_key)->first();
|
||||||
|
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
|
@ -64,13 +64,13 @@ class BankTransactionSync implements ShouldQueue
|
|||||||
|
|
||||||
private function processYodlee()
|
private function processYodlee()
|
||||||
{
|
{
|
||||||
if (Ninja::isHosted()) { // @turbo124 @todo I migrated the schedule for the job within the kernel to execute on all platforms and use the same expression here to determine if yodlee can run or not. Please chek/verify
|
if (Ninja::isHosted()) {
|
||||||
nlog("syncing transactions - yodlee");
|
nlog("syncing transactions - yodlee");
|
||||||
|
|
||||||
Account::with('bank_integrations')->whereNotNull('bank_integration_account_id')->cursor()->each(function ($account) {
|
Account::with('bank_integrations')->whereNotNull('bank_integration_account_id')->cursor()->each(function ($account) {
|
||||||
|
|
||||||
if ($account->isPaid() && $account->plan == 'enterprise') {
|
if ($account->isEnterprisePaidClient()) {
|
||||||
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_YODLEE)->where('auto_sync', true)->cursor()->each(function ($bank_integration) use ($account) {
|
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_YODLEE)->where('auto_sync', true)->where('disabled_upstream', 0)->cursor()->each(function ($bank_integration) use ($account) {
|
||||||
(new ProcessBankTransactionsYodlee($account->id, $bank_integration))->handle();
|
(new ProcessBankTransactionsYodlee($account->id, $bank_integration))->handle();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -80,13 +80,13 @@ class BankTransactionSync implements ShouldQueue
|
|||||||
}
|
}
|
||||||
private function processNordigen()
|
private function processNordigen()
|
||||||
{
|
{
|
||||||
if (config("ninja.nordigen.secret_id") && config("ninja.nordigen.secret_key")) { // @turbo124 check condition, when to execute this should be placed here (isSelfHosted || isPro/isEnterprise)
|
if (config("ninja.nordigen.secret_id") && config("ninja.nordigen.secret_key")) {
|
||||||
nlog("syncing transactions - nordigen");
|
nlog("syncing transactions - nordigen");
|
||||||
|
|
||||||
Account::with('bank_integrations')->cursor()->each(function ($account) {
|
Account::with('bank_integrations')->cursor()->each(function ($account) {
|
||||||
|
|
||||||
if ((Ninja::isSelfHost() || (Ninja::isHosted() && $account->isPaid() && $account->plan == 'enterprise'))) {
|
if ((Ninja::isSelfHost() || (Ninja::isHosted() && $account->isEnterprisePaidClient()))) {
|
||||||
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_NORDIGEN)->where('auto_sync', true)->cursor()->each(function ($bank_integration) {
|
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_NORDIGEN)->where('auto_sync', true)->where('disabled_upstream', 0)->cursor()->each(function ($bank_integration) {
|
||||||
(new ProcessBankTransactionsNordigen($bank_integration))->handle();
|
(new ProcessBankTransactionsNordigen($bank_integration))->handle();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ use Illuminate\Foundation\Bus\Dispatchable;
|
|||||||
use App\DataMapper\Analytics\Mail\EmailSpam;
|
use App\DataMapper\Analytics\Mail\EmailSpam;
|
||||||
use App\DataMapper\Analytics\Mail\EmailBounce;
|
use App\DataMapper\Analytics\Mail\EmailBounce;
|
||||||
use App\Notifications\Ninja\EmailSpamNotification;
|
use App\Notifications\Ninja\EmailSpamNotification;
|
||||||
|
use App\Notifications\Ninja\EmailBounceNotification;
|
||||||
|
|
||||||
class ProcessPostmarkWebhook implements ShouldQueue
|
class ProcessPostmarkWebhook implements ShouldQueue
|
||||||
{
|
{
|
||||||
@ -103,6 +104,11 @@ class ProcessPostmarkWebhook implements ShouldQueue
|
|||||||
case 'Delivery':
|
case 'Delivery':
|
||||||
return $this->processDelivery();
|
return $this->processDelivery();
|
||||||
case 'Bounce':
|
case 'Bounce':
|
||||||
|
|
||||||
|
if($this->request['Subject'] == ctrans('texts.confirmation_subject')) {
|
||||||
|
$company->notification(new EmailBounceNotification($this->request['Email']))->ninja();
|
||||||
|
}
|
||||||
|
|
||||||
return $this->processBounce();
|
return $this->processBounce();
|
||||||
case 'SpamComplaint':
|
case 'SpamComplaint':
|
||||||
return $this->processSpamComplaint();
|
return $this->processSpamComplaint();
|
||||||
@ -263,8 +269,6 @@ class ProcessPostmarkWebhook implements ShouldQueue
|
|||||||
|
|
||||||
(new SystemLogger($data, SystemLog::CATEGORY_MAIL, SystemLog::EVENT_MAIL_BOUNCED, SystemLog::TYPE_WEBHOOK_RESPONSE, $this->invitation->contact->client, $this->invitation->company))->handle();
|
(new SystemLogger($data, SystemLog::CATEGORY_MAIL, SystemLog::EVENT_MAIL_BOUNCED, SystemLog::TYPE_WEBHOOK_RESPONSE, $this->invitation->contact->client, $this->invitation->company))->handle();
|
||||||
|
|
||||||
// if(config('ninja.notification.slack'))
|
|
||||||
// $this->invitation->company->notification(new EmailBounceNotification($this->invitation->company->account))->ninja();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// {
|
// {
|
||||||
|
@ -43,7 +43,7 @@ class CreatedClientActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->client->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->client->user_id;
|
||||||
|
|
||||||
$fields->client_id = $event->client->id;
|
$fields->client_id = $event->client->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class CreatedCreditActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->credit->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->credit->user_id;
|
||||||
|
|
||||||
$fields->credit_id = $event->credit->id;
|
$fields->credit_id = $event->credit->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class CreatedExpenseActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->expense->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->expense->user_id;
|
||||||
|
|
||||||
$fields->expense_id = $event->expense->id;
|
$fields->expense_id = $event->expense->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class CreatedQuoteActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->quote->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->quote->user_id;
|
||||||
|
|
||||||
$fields->quote_id = $event->quote->id;
|
$fields->quote_id = $event->quote->id;
|
||||||
$fields->client_id = $event->quote->client_id;
|
$fields->client_id = $event->quote->client_id;
|
||||||
|
@ -43,7 +43,7 @@ class CreatedSubscriptionActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->subscription->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->subscription->user_id;
|
||||||
|
|
||||||
$fields->subscription_id = $event->subscription->id;
|
$fields->subscription_id = $event->subscription->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class CreatedTaskActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->task->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->task->user_id;
|
||||||
|
|
||||||
$fields->task_id = $event->task->id;
|
$fields->task_id = $event->task->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class CreatedVendorActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->vendor->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->vendor->user_id;
|
||||||
|
|
||||||
$fields->vendor_id = $event->vendor->id;
|
$fields->vendor_id = $event->vendor->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class CreditArchivedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->credit->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->credit->user_id;
|
||||||
|
|
||||||
$fields->credit_id = $event->credit->id;
|
$fields->credit_id = $event->credit->id;
|
||||||
$fields->client_id = $event->credit->client_id;
|
$fields->client_id = $event->credit->client_id;
|
||||||
|
@ -43,7 +43,7 @@ class DeleteClientActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->client->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->client->user_id;
|
||||||
|
|
||||||
$fields->client_id = $event->client->id;
|
$fields->client_id = $event->client->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class DeleteCreditActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->credit->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->credit->user_id;
|
||||||
|
|
||||||
$fields->client_id = $event->credit->client_id;
|
$fields->client_id = $event->credit->client_id;
|
||||||
$fields->credit_id = $event->credit->id;
|
$fields->credit_id = $event->credit->id;
|
||||||
|
@ -45,7 +45,7 @@ class ExpenseArchivedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->expense->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->expense->user_id;
|
||||||
|
|
||||||
$fields->expense_id = $expense->id;
|
$fields->expense_id = $expense->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class ExpenseDeletedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->expense->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->expense->user_id;
|
||||||
|
|
||||||
$fields->expense_id = $event->expense->id;
|
$fields->expense_id = $event->expense->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class ExpenseRestoredActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->expense->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->expense->user_id;
|
||||||
|
|
||||||
$fields->expense_id = $event->expense->id;
|
$fields->expense_id = $event->expense->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class ExpenseUpdatedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$expense = $event->expense;
|
$expense = $event->expense;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->expense->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->expense->user_id;
|
||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class PaymentArchivedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
||||||
|
|
||||||
$fields->payment_id = $payment->id;
|
$fields->payment_id = $payment->id;
|
||||||
$fields->client_id = $payment->client_id;
|
$fields->client_id = $payment->client_id;
|
||||||
|
@ -50,7 +50,7 @@ class PaymentCreatedActivity implements ShouldQueue
|
|||||||
$invoice_id = $payment->invoices()->first()->id;
|
$invoice_id = $payment->invoices()->first()->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
@ -60,7 +60,8 @@ class PaymentCreatedActivity implements ShouldQueue
|
|||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->company_id = $payment->company_id;
|
$fields->company_id = $payment->company_id;
|
||||||
$fields->activity_type_id = Activity::CREATE_PAYMENT;
|
$fields->activity_type_id = Activity::CREATE_PAYMENT;
|
||||||
|
$fields->client_contact_id = $payment->client_contact_id ?? null;
|
||||||
|
|
||||||
$this->activity_repo->save($fields, $payment, $event->event_vars);
|
$this->activity_repo->save($fields, $payment, $event->event_vars);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class PaymentDeletedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$payment = $event->payment;
|
$payment = $event->payment;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
||||||
|
|
||||||
$invoices = $payment->invoices;
|
$invoices = $payment->invoices;
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class PaymentRefundedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
||||||
|
|
||||||
$fields->client_id = $event->payment->client_id;
|
$fields->client_id = $event->payment->client_id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -48,7 +48,7 @@ class PaymentUpdatedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
||||||
|
|
||||||
$fields->payment_id = $payment->id;
|
$fields->payment_id = $payment->id;
|
||||||
$fields->client_id = $payment->client_id;
|
$fields->client_id = $payment->client_id;
|
||||||
|
@ -43,7 +43,7 @@ class PaymentVoidedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
||||||
|
|
||||||
$fields->client_id = $event->payment->id;
|
$fields->client_id = $event->payment->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -45,7 +45,7 @@ class QuoteUpdatedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->quote->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->quote->user_id;
|
||||||
|
|
||||||
$fields->quote_id = $quote->id;
|
$fields->quote_id = $quote->id;
|
||||||
$fields->client_id = $quote->client_id;
|
$fields->client_id = $quote->client_id;
|
||||||
|
@ -43,7 +43,7 @@ class RestoreClientActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->client->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->client->user_id;
|
||||||
|
|
||||||
$fields->client_id = $event->client->id;
|
$fields->client_id = $event->client->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -45,7 +45,7 @@ class SubscriptionArchivedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->subscription->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->subscription->user_id;
|
||||||
|
|
||||||
$fields->subscription_id = $subscription->id;
|
$fields->subscription_id = $subscription->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class SubscriptionDeletedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->subscription->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->subscription->user_id;
|
||||||
|
|
||||||
$fields->subscription_id = $event->subscription->id;
|
$fields->subscription_id = $event->subscription->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class SubscriptionRestoredActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->subscription->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->subscription->user_id;
|
||||||
|
|
||||||
$fields->subscription_id = $event->subscription->id;
|
$fields->subscription_id = $event->subscription->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -45,7 +45,7 @@ class SubscriptionUpdatedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->subscription->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->subscription->user_id;
|
||||||
|
|
||||||
$fields->subscription_id = $subscription->id;
|
$fields->subscription_id = $subscription->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -45,7 +45,7 @@ class TaskArchivedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->task->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->task->user_id;
|
||||||
|
|
||||||
$fields->task_id = $task->id;
|
$fields->task_id = $task->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class TaskDeletedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->task->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->task->user_id;
|
||||||
|
|
||||||
$fields->task_id = $event->task->id;
|
$fields->task_id = $event->task->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class TaskRestoredActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->task->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->task->user_id;
|
||||||
|
|
||||||
$fields->task_id = $event->task->id;
|
$fields->task_id = $event->task->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -45,7 +45,7 @@ class TaskUpdatedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->task->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->task->user_id;
|
||||||
|
|
||||||
$fields->task_id = $task->id;
|
$fields->task_id = $task->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class UpdatedCreditActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->credit->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->credit->user_id;
|
||||||
|
|
||||||
$fields->credit_id = $event->credit->id;
|
$fields->credit_id = $event->credit->id;
|
||||||
$fields->client_id = $event->credit->client_id;
|
$fields->client_id = $event->credit->client_id;
|
||||||
|
@ -45,7 +45,7 @@ class VendorArchivedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->vendor->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->vendor->user_id;
|
||||||
|
|
||||||
$fields->vendor_id = $vendor->id;
|
$fields->vendor_id = $vendor->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class VendorDeletedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->vendor->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->vendor->user_id;
|
||||||
|
|
||||||
$fields->vendor_id = $event->vendor->id;
|
$fields->vendor_id = $event->vendor->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -43,7 +43,7 @@ class VendorRestoredActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->vendor->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->vendor->user_id;
|
||||||
|
|
||||||
$fields->vendor_id = $event->vendor->id;
|
$fields->vendor_id = $event->vendor->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -45,7 +45,7 @@ class VendorUpdatedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->vendor->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->vendor->user_id;
|
||||||
|
|
||||||
$fields->vendor_id = $vendor->id;
|
$fields->vendor_id = $vendor->id;
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
@ -47,12 +47,9 @@ class CreditEmailedNotification implements ShouldQueue
|
|||||||
foreach ($event->invitation->company->company_users as $company_user) {
|
foreach ($event->invitation->company->company_users as $company_user) {
|
||||||
$user = $company_user->user;
|
$user = $company_user->user;
|
||||||
|
|
||||||
// $notification = new EntitySentNotification($event->invitation, 'credit');
|
|
||||||
|
|
||||||
$methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'credit', ['all_notifications', 'credit_sent', 'credit_sent_all', 'credit_sent_user']);
|
$methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'credit', ['all_notifications', 'credit_sent', 'credit_sent_all', 'credit_sent_user']);
|
||||||
|
|
||||||
if (($key = array_search('mail', $methods)) !== false) {
|
if (($key = array_search('mail', $methods)) !== false) {
|
||||||
// if (($key = array_search('mail', $methods))) {
|
|
||||||
unset($methods[$key]);
|
unset($methods[$key]);
|
||||||
|
|
||||||
$nmo = new NinjaMailerObject;
|
$nmo = new NinjaMailerObject;
|
||||||
|
@ -43,7 +43,7 @@ class CreditRestoredActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->credit->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->credit->user_id;
|
||||||
|
|
||||||
$fields->credit_id = $event->credit->id;
|
$fields->credit_id = $event->credit->id;
|
||||||
$fields->client_id = $event->credit->client_id;
|
$fields->client_id = $event->credit->client_id;
|
||||||
|
@ -45,7 +45,7 @@ class CreditViewedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invitation->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invitation->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->company_id = $event->invitation->company_id;
|
$fields->company_id = $event->invitation->company_id;
|
||||||
|
@ -45,7 +45,7 @@ class CreateInvoiceActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->invoice_id = $event->invoice->id;
|
$fields->invoice_id = $event->invoice->id;
|
||||||
|
@ -45,7 +45,7 @@ class InvoiceArchivedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class InvoiceCancelledActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->invoice_id = $event->invoice->id;
|
$fields->invoice_id = $event->invoice->id;
|
||||||
|
@ -45,7 +45,7 @@ class InvoiceDeletedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->invoice_id = $event->invoice->id;
|
$fields->invoice_id = $event->invoice->id;
|
||||||
|
@ -45,7 +45,7 @@ class InvoiceEmailActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->invoice_id = $event->invitation->invoice->id;
|
$fields->invoice_id = $event->invitation->invoice->id;
|
||||||
|
@ -49,7 +49,7 @@ class InvoiceEmailFailedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
|
||||||
|
@ -45,11 +45,12 @@ class InvoicePaidActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->invoice_id = $event->invoice->id;
|
$fields->invoice_id = $event->invoice->id;
|
||||||
$fields->client_id = $event->payment->client_id;
|
$fields->client_id = $event->payment->client_id;
|
||||||
|
$fields->client_contact_id = $event->payment->client_contact_id ?? null;
|
||||||
$fields->company_id = $event->invoice->company_id;
|
$fields->company_id = $event->invoice->company_id;
|
||||||
$fields->activity_type_id = Activity::PAID_INVOICE;
|
$fields->activity_type_id = Activity::PAID_INVOICE;
|
||||||
$fields->payment_id = $event->payment->id;
|
$fields->payment_id = $event->payment->id;
|
||||||
|
@ -44,7 +44,7 @@ class InvoiceReminderEmailActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
||||||
|
|
||||||
$reminder = match($event->template) {
|
$reminder = match($event->template) {
|
||||||
'reminder1' => 63,
|
'reminder1' => 63,
|
||||||
|
@ -45,7 +45,7 @@ class InvoiceRestoredActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->invoice_id = $event->invoice->id;
|
$fields->invoice_id = $event->invoice->id;
|
||||||
|
@ -45,7 +45,7 @@ class InvoiceReversedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->invoice_id = $event->invoice->id;
|
$fields->invoice_id = $event->invoice->id;
|
||||||
|
@ -45,7 +45,7 @@ class InvoiceViewedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invitation->invoice->user_id;
|
||||||
|
|
||||||
$event->invitation->invoice->service()->markSent()->save();
|
$event->invitation->invoice->service()->markSent()->save();
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class UpdateInvoiceActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invoice->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->client_id = $event->invoice->client_id;
|
$fields->client_id = $event->invoice->client_id;
|
||||||
|
@ -41,7 +41,7 @@ class PaymentEmailedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new \stdClass();
|
$fields = new \stdClass();
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->client_id = $event->payment->client_id;
|
$fields->client_id = $event->payment->client_id;
|
||||||
|
@ -45,7 +45,7 @@ class PaymentRestoredActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->payment->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->payment_id = $event->payment->id;
|
$fields->payment_id = $event->payment->id;
|
||||||
|
@ -45,7 +45,7 @@ class CreatePurchaseOrderActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->purchase_order->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->purchase_order->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->purchase_order_id = $event->purchase_order->id;
|
$fields->purchase_order_id = $event->purchase_order->id;
|
||||||
|
@ -45,7 +45,7 @@ class PurchaseOrderAcceptedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->purchase_order->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->purchase_order->user_id;
|
||||||
|
|
||||||
$event->purchase_order->service()->markSent()->save();
|
$event->purchase_order->service()->markSent()->save();
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class PurchaseOrderArchivedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->purchase_order->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->purchase_order->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class PurchaseOrderDeletedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->purchase_order->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->purchase_order->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->purchase_order_id = $event->purchase_order->id;
|
$fields->purchase_order_id = $event->purchase_order->id;
|
||||||
|
@ -45,7 +45,7 @@ class PurchaseOrderEmailActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invitation->purchase_order->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invitation->purchase_order->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->purchase_order_id = $event->invitation->purchase_order->id;
|
$fields->purchase_order_id = $event->invitation->purchase_order->id;
|
||||||
|
@ -45,7 +45,7 @@ class PurchaseOrderRestoredActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->purchase_order->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->purchase_order->user_id;
|
||||||
|
|
||||||
$fields->user_id = $user_id;
|
$fields->user_id = $user_id;
|
||||||
$fields->purchase_order_id = $event->purchase_order->id;
|
$fields->purchase_order_id = $event->purchase_order->id;
|
||||||
|
@ -45,7 +45,7 @@ class PurchaseOrderViewedActivity implements ShouldQueue
|
|||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$user_id = array_key_exists('user_id', $event->event_vars) ? $event->event_vars['user_id'] : $event->invitation->purchase_order->user_id;
|
$user_id = isset($event->event_vars['user_id']) ? $event->event_vars['user_id'] : $event->invitation->purchase_order->user_id;
|
||||||
|
|
||||||
$event->invitation->purchase_order->service()->markSent()->save();
|
$event->invitation->purchase_order->service()->markSent()->save();
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user