diff --git a/app/Events/Client/ClientWasArchived.php b/app/Events/Client/ClientWasArchived.php index 709d9c7b11ac..1e0788ca447c 100644 --- a/app/Events/Client/ClientWasArchived.php +++ b/app/Events/Client/ClientWasArchived.php @@ -16,13 +16,14 @@ use App\Models\Company; use Illuminate\Broadcasting\Channel; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Broadcasting\PrivateChannel; +use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; /** * Class ClientWasArchived. */ -class ClientWasArchived +class ClientWasArchived implements ShouldBroadcast { use Dispatchable, InteractsWithSockets, SerializesModels; @@ -55,7 +56,7 @@ class ClientWasArchived * @return Channel|array */ public function broadcastOn() - { + {nlog("broadcasting"); return new PrivateChannel('channel-name'); } } diff --git a/app/Http/Controllers/ClientPortal/PrePaymentController.php b/app/Http/Controllers/ClientPortal/PrePaymentController.php index 010aaf745be6..9c8070e572d4 100644 --- a/app/Http/Controllers/ClientPortal/PrePaymentController.php +++ b/app/Http/Controllers/ClientPortal/PrePaymentController.php @@ -38,8 +38,13 @@ class PrePaymentController extends Controller */ public function index() { - $data['minimum_amount'] = auth()->guard('contact')->user()->client->getSetting('client_initiated_payments_minimum'); - $data['title'] = ctrans('texts.amount'). " " .auth()->guard('contact')->user()->client->currency()->code." (".auth()->guard('contact')->user()->client->currency()->symbol . ")"; + + $data = [ + 'title' => ctrans('texts.amount'). " " .auth()->guard('contact')->user()->client->currency()->code." (".auth()->guard('contact')->user()->client->currency()->symbol . ")", + 'allows_recurring' => auth()->guard('contact')->user()->client->getSetting('client_initiated_payments_recurring'), + 'allows_recurring' => true, + 'minimum_amount' => auth()->guard('contact')->user()->client->getSetting('client_initiated_payments_minimum'), + ]; return $this->render('pre_payments.index', $data); } diff --git a/app/Http/Controllers/SubdomainController.php b/app/Http/Controllers/SubdomainController.php index 287e5cc819b6..e32f184d3895 100644 --- a/app/Http/Controllers/SubdomainController.php +++ b/app/Http/Controllers/SubdomainController.php @@ -38,6 +38,7 @@ class SubdomainController extends BaseController 'beta', 'prometh', 'license', + 'socket', ]; public function __construct() diff --git a/composer.json b/composer.json index c85baeeb4327..eb24cf0460f1 100644 --- a/composer.json +++ b/composer.json @@ -74,7 +74,7 @@ "omnipay/paypal": "^3.0", "payfast/payfast-php-sdk": "^1.1", "pragmarx/google2fa": "^8.0", - "turbo124/predis": "1.1.11", + "pusher/pusher-php-server": "^7.2", "razorpay/razorpay": "2.*", "sentry/sentry-laravel": "^3", "setasign/fpdf": "^1.8", @@ -88,6 +88,7 @@ "symfony/mailgun-mailer": "^6.1", "symfony/postmark-mailer": "^6.1", "turbo124/beacon": "^1.4", + "turbo124/predis": "1.1.11", "twilio/sdk": "^6.40", "webpatser/laravel-countries": "dev-master#75992ad", "wepay/php-sdk": "^0.3" diff --git a/composer.lock b/composer.lock index 6cf928a7b942..d3c2b6033f11 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5aa22a61531e67324395d207a7c94e27", + "content-hash": "9f936d7b92dfacb4e28eda9197563c32", "packages": [ { "name": "afosto/yaac", @@ -6369,6 +6369,92 @@ }, "time": "2020-10-15T08:29:30+00:00" }, + { + "name": "paragonie/sodium_compat", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/sodium_compat.git", + "reference": "cb15e403ecbe6a6cc515f855c310eb6b1872a933" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/cb15e403ecbe6a6cc515f855c310eb6b1872a933", + "reference": "cb15e403ecbe6a6cc515f855c310eb6b1872a933", + "shasum": "" + }, + "require": { + "paragonie/random_compat": ">=1", + "php": "^5.2.4|^5.3|^5.4|^5.5|^5.6|^7|^8" + }, + "require-dev": { + "phpunit/phpunit": "^3|^4|^5|^6|^7|^8|^9" + }, + "suggest": { + "ext-libsodium": "PHP < 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security.", + "ext-sodium": "PHP >= 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security." + }, + "type": "library", + "autoload": { + "files": [ + "autoload.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com" + }, + { + "name": "Frank Denis", + "email": "jedisct1@pureftpd.org" + } + ], + "description": "Pure PHP implementation of libsodium; uses the PHP extension if it exists", + "keywords": [ + "Authentication", + "BLAKE2b", + "ChaCha20", + "ChaCha20-Poly1305", + "Chapoly", + "Curve25519", + "Ed25519", + "EdDSA", + "Edwards-curve Digital Signature Algorithm", + "Elliptic Curve Diffie-Hellman", + "Poly1305", + "Pure-PHP cryptography", + "RFC 7748", + "RFC 8032", + "Salpoly", + "Salsa20", + "X25519", + "XChaCha20-Poly1305", + "XSalsa20-Poly1305", + "Xchacha20", + "Xsalsa20", + "aead", + "cryptography", + "ecdh", + "elliptic curve", + "elliptic curve cryptography", + "encryption", + "libsodium", + "php", + "public-key cryptography", + "secret-key cryptography", + "side-channel resistant" + ], + "support": { + "issues": "https://github.com/paragonie/sodium_compat/issues", + "source": "https://github.com/paragonie/sodium_compat/tree/v1.19.0" + }, + "time": "2022-09-26T03:40:35+00:00" + }, { "name": "payfast/payfast-php-sdk", "version": "v1.1.4", @@ -7645,6 +7731,67 @@ }, "time": "2023-01-29T21:24:40+00:00" }, + { + "name": "pusher/pusher-php-server", + "version": "7.2.2", + "source": { + "type": "git", + "url": "https://github.com/pusher/pusher-http-php.git", + "reference": "4ace4873873b06c25cecb2dd6d9fdcbf2f20b640" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pusher/pusher-http-php/zipball/4ace4873873b06c25cecb2dd6d9fdcbf2f20b640", + "reference": "4ace4873873b06c25cecb2dd6d9fdcbf2f20b640", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "guzzlehttp/guzzle": "^7.2", + "paragonie/sodium_compat": "^1.6", + "php": "^7.3|^8.0", + "psr/log": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "overtrue/phplint": "^2.3", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Pusher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Library for interacting with the Pusher REST API", + "keywords": [ + "events", + "messaging", + "php-pusher-server", + "publish", + "push", + "pusher", + "real time", + "real-time", + "realtime", + "rest", + "trigger" + ], + "support": { + "issues": "https://github.com/pusher/pusher-http-php/issues", + "source": "https://github.com/pusher/pusher-http-php/tree/7.2.2" + }, + "time": "2022-12-20T19:52:36+00:00" + }, { "name": "ralouphie/getallheaders", "version": "3.0.3", diff --git a/database/seeders/RandomDataSeeder.php b/database/seeders/RandomDataSeeder.php index 6ecc2b535c3a..13a0e89c091d 100644 --- a/database/seeders/RandomDataSeeder.php +++ b/database/seeders/RandomDataSeeder.php @@ -110,6 +110,7 @@ class RandomDataSeeder extends Seeder 'account_id' => $account->id, 'name' => 'test token', 'token' => \Illuminate\Support\Str::random(64), + 'is_system' => 1 ]); $user->companies()->attach($company->id, [ @@ -157,6 +158,7 @@ class RandomDataSeeder extends Seeder 'account_id' => $account->id, 'name' => 'test token', 'token' => \Illuminate\Support\Str::random(64), + 'is_system' => 1, ]); $user->companies()->attach($company->id, [ @@ -200,6 +202,7 @@ class RandomDataSeeder extends Seeder 'account_id' => $account->id, 'name' => 'test token', 'token' => \Illuminate\Support\Str::random(64), + 'is_system' => 1, ]); diff --git a/lang/en/texts.php b/lang/en/texts.php index 0c91c98bcd70..19230f5b0211 100644 --- a/lang/en/texts.php +++ b/lang/en/texts.php @@ -5021,6 +5021,7 @@ $LANG = array( 'payment_type_Klarna' => 'Klarna', 'payment_type_Interac E Transfer' => 'Interac E Transfer', 'pre_payment' => 'Pre Payment', + 'client_remaining_cycles_helper' => 'The number of times this invoice will be generated', ); diff --git a/resources/views/portal/ninja2020/pre_payments/index.blade.php b/resources/views/portal/ninja2020/pre_payments/index.blade.php index 49a0735afb56..50acf0fa0ad6 100644 --- a/resources/views/portal/ninja2020/pre_payments/index.blade.php +++ b/resources/views/portal/ninja2020/pre_payments/index.blade.php @@ -1,6 +1,11 @@ @extends('portal.ninja2020.layout.app') @section('meta_title', ctrans('texts.pre_payment')) +@push('head') + +@endpush @section('body')