Merge pull request #10631 from turbo124/v5-develop

v5.11.35
This commit is contained in:
David Bomba 2025-02-04 21:01:27 +11:00 committed by GitHub
commit a40eee7583
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 59 additions and 56 deletions

View File

@ -1 +1 @@
5.11.34
5.11.35

View File

@ -65,7 +65,12 @@ class PostMarkController extends BaseController
public function webhook(Request $request)
{
if ($request->header('X-API-SECURITY') && $request->header('X-API-SECURITY') == config('services.postmark.token')) {
ProcessPostmarkWebhook::dispatch($request->all())->delay(15);
ProcessPostmarkWebhook::dispatch($request->all(), $request->header('X-API-SECURITY'))->delay(15);
return response()->json(['message' => 'Success'], 200);
}
elseif($request->header('X-API-SECURITY') && stripos($request->header('X-API-SECURITY'), \Illuminate\Support\Facades\Cache::get('client_postmark_keys')) !== false){
ProcessPostmarkWebhook::dispatch($request->all(), $request->header('X-API-SECURITY'))->delay(15);
return response()->json(['message' => 'Success'], 200);
}

View File

@ -170,6 +170,10 @@ class UpdateCompanyRequest extends Request
$input['enabled_item_tax_rates'] = 1;
}
if(isset($input['session_timeout']) && $input['session_timeout'] < 0) {
$input['session_timeout'] = 0;
}
$this->replace($input);
}

View File

@ -59,7 +59,7 @@ class ProcessPostmarkWebhook implements ShouldQueue
* Create a new job instance.
*
*/
public function __construct(private array $request)
public function __construct(private array $request, private string $security_token)
{
}
@ -356,9 +356,7 @@ class ProcessPostmarkWebhook implements ShouldQueue
public function getRawMessage(string $message_id)
{
$postmark_secret = !empty($this->company->settings->postmark_secret) ? $this->company->settings->postmark_secret : config('services.postmark.token');
$postmark = new PostmarkClient($postmark_secret);
$postmark = new PostmarkClient($this->security_token);
$messageDetail = $postmark->getOutboundMessageDetails($message_id);
try {
@ -400,9 +398,7 @@ class ProcessPostmarkWebhook implements ShouldQueue
try {
$postmark_secret = !empty($this->company->settings->postmark_secret) ? $this->company->settings->postmark_secret : config('services.postmark.token');
$postmark = new PostmarkClient($postmark_secret);
$postmark = new PostmarkClient($this->security_token);
try {
$messageDetail = $postmark->getOutboundMessageDetails($this->request['MessageID']);

View File

@ -69,7 +69,12 @@ class UpdateUserLastLogin implements ShouldQueue
$nmo->company = $user->account->companies->first();
$nmo->settings = $user->account->companies->first()->settings;
$nmo->to_user = $user;
try{
NinjaMailerJob::dispatch($nmo, true);
} catch (\Exception $e) {
//this will catch for users that don't have their mail server configured correctly.
}
$user->ip = $ip;
$user->save();

View File

@ -207,13 +207,6 @@ class InstantBankPay implements MethodInterface, LivewireMethodInterface
{
PaymentFailureMailer::dispatch($this->go_cardless->client, $payment->status, $this->go_cardless->client->company, $this->go_cardless->payment_hash->data->amount_with_fee);
// PaymentFailureMailer::dispatch(
// $this->go_cardless->client,
// $payment,
// $this->go_cardless->client->company,
// $payment->amount
// );
$message = [
'server_response' => $payment,
'data' => $this->go_cardless->payment_hash->data,

View File

@ -88,7 +88,7 @@ class GoCardlessPaymentDriver extends BaseDriver
$types[] = GatewayType::SEPA;
}
if ($this->client && $this->client->currency()->code === 'GBP') {
if ($this->client && (($this->client->currency()->code === 'GBP' && $this->client->country->iso_3166_2 === 'GB') || ($this->client->currency()->code === 'EUR' && in_array($this->client->country->iso_3166_2, ['IE','FR','DE'])))) {
$types[] = GatewayType::INSTANT_BANK_PAY;
}

70
composer.lock generated
View File

@ -3032,16 +3032,16 @@
},
{
"name": "google/apiclient-services",
"version": "v0.392.0",
"version": "v0.393.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git",
"reference": "a74c2790865bd1f06c0a49460ef1c0edb0be0e7e"
"reference": "ed24c09584df8ef0cdcfb9d4305abf66fc17e609"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/a74c2790865bd1f06c0a49460ef1c0edb0be0e7e",
"reference": "a74c2790865bd1f06c0a49460ef1c0edb0be0e7e",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/ed24c09584df8ef0cdcfb9d4305abf66fc17e609",
"reference": "ed24c09584df8ef0cdcfb9d4305abf66fc17e609",
"shasum": ""
},
"require": {
@ -3070,9 +3070,9 @@
],
"support": {
"issues": "https://github.com/googleapis/google-api-php-client-services/issues",
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.392.0"
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.393.0"
},
"time": "2025-01-27T01:10:20+00:00"
"time": "2025-02-03T00:54:21+00:00"
},
{
"name": "google/auth",
@ -3580,16 +3580,16 @@
},
{
"name": "guzzlehttp/uri-template",
"version": "v1.0.3",
"version": "v1.0.4",
"source": {
"type": "git",
"url": "https://github.com/guzzle/uri-template.git",
"reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c"
"reference": "30e286560c137526eccd4ce21b2de477ab0676d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/uri-template/zipball/ecea8feef63bd4fef1f037ecb288386999ecc11c",
"reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c",
"url": "https://api.github.com/repos/guzzle/uri-template/zipball/30e286560c137526eccd4ce21b2de477ab0676d2",
"reference": "30e286560c137526eccd4ce21b2de477ab0676d2",
"shasum": ""
},
"require": {
@ -3646,7 +3646,7 @@
],
"support": {
"issues": "https://github.com/guzzle/uri-template/issues",
"source": "https://github.com/guzzle/uri-template/tree/v1.0.3"
"source": "https://github.com/guzzle/uri-template/tree/v1.0.4"
},
"funding": [
{
@ -3662,7 +3662,7 @@
"type": "tidelift"
}
],
"time": "2023-12-03T19:50:20+00:00"
"time": "2025-02-03T10:55:03+00:00"
},
{
"name": "halaxa/json-machine",
@ -4064,16 +4064,16 @@
},
{
"name": "horstoeko/zugferd",
"version": "v1.0.104",
"version": "v1.0.106",
"source": {
"type": "git",
"url": "https://github.com/horstoeko/zugferd.git",
"reference": "9c37fbe55e37e3082dc3702867d669fb67ef988e"
"reference": "e575f67aaf08f670e435ba01d188b6faa62655a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/horstoeko/zugferd/zipball/9c37fbe55e37e3082dc3702867d669fb67ef988e",
"reference": "9c37fbe55e37e3082dc3702867d669fb67ef988e",
"url": "https://api.github.com/repos/horstoeko/zugferd/zipball/e575f67aaf08f670e435ba01d188b6faa62655a0",
"reference": "e575f67aaf08f670e435ba01d188b6faa62655a0",
"shasum": ""
},
"require": {
@ -4132,9 +4132,9 @@
],
"support": {
"issues": "https://github.com/horstoeko/zugferd/issues",
"source": "https://github.com/horstoeko/zugferd/tree/v1.0.104"
"source": "https://github.com/horstoeko/zugferd/tree/v1.0.106"
},
"time": "2025-01-19T09:23:02+00:00"
"time": "2025-02-03T13:26:12+00:00"
},
{
"name": "horstoeko/zugferdvisualizer",
@ -5158,16 +5158,16 @@
},
{
"name": "laravel/framework",
"version": "v11.41.0",
"version": "v11.41.3",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "42d6ae000c868c2abfa946da46702f2358493482"
"reference": "3ef433d5865f30a19b6b1be247586068399b59cc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/42d6ae000c868c2abfa946da46702f2358493482",
"reference": "42d6ae000c868c2abfa946da46702f2358493482",
"url": "https://api.github.com/repos/laravel/framework/zipball/3ef433d5865f30a19b6b1be247586068399b59cc",
"reference": "3ef433d5865f30a19b6b1be247586068399b59cc",
"shasum": ""
},
"require": {
@ -5369,7 +5369,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2025-01-28T15:22:55+00:00"
"time": "2025-01-30T13:25:22+00:00"
},
{
"name": "laravel/octane",
@ -17909,16 +17909,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.68.3",
"version": "v3.68.5",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "85fd31cced824749a732e697acdd1a3d657312f0"
"reference": "7bedb718b633355272428c60736dc97fb96daf27"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/85fd31cced824749a732e697acdd1a3d657312f0",
"reference": "85fd31cced824749a732e697acdd1a3d657312f0",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7bedb718b633355272428c60736dc97fb96daf27",
"reference": "7bedb718b633355272428c60736dc97fb96daf27",
"shasum": ""
},
"require": {
@ -18000,7 +18000,7 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.68.3"
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.68.5"
},
"funding": [
{
@ -18008,7 +18008,7 @@
"type": "github"
}
],
"time": "2025-01-27T16:37:32+00:00"
"time": "2025-01-30T17:00:50+00:00"
},
{
"name": "hamcrest/hamcrest-php",
@ -19050,16 +19050,16 @@
},
{
"name": "phpunit/phpunit",
"version": "11.5.5",
"version": "11.5.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "b9a975972f580c0491f834eb0818ad2b32fd8bba"
"reference": "3c3ae14c90f244cdda95028c3e469028e8d1c02c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b9a975972f580c0491f834eb0818ad2b32fd8bba",
"reference": "b9a975972f580c0491f834eb0818ad2b32fd8bba",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3c3ae14c90f244cdda95028c3e469028e8d1c02c",
"reference": "3c3ae14c90f244cdda95028c3e469028e8d1c02c",
"shasum": ""
},
"require": {
@ -19131,7 +19131,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.5"
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.6"
},
"funding": [
{
@ -19147,7 +19147,7 @@
"type": "tidelift"
}
],
"time": "2025-01-29T14:01:11+00:00"
"time": "2025-01-31T07:03:30+00:00"
},
{
"name": "react/cache",

View File

@ -17,8 +17,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => env('APP_VERSION', '5.11.34'),
'app_tag' => env('APP_TAG', '5.11.34'),
'app_version' => env('APP_VERSION', '5.11.35'),
'app_tag' => env('APP_TAG', '5.11.35'),
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false),

View File

@ -465,7 +465,7 @@ Route::match(['get', 'post'], 'payment_notification_webhook/{company_key}/{compa
->name('payment_notification_webhook');
Route::post('api/v1/postmark_webhook', [PostMarkController::class, 'webhook'])->middleware('throttle:2000,1');
Route::post('api/v1/postmark_webhook', [PostMarkController::class, 'webhook'])->middleware('throttle:5000,1');
Route::post('api/v1/postmark_inbound_webhook', [PostMarkController::class, 'inboundWebhook'])->middleware('throttle:1000,1');
Route::post('api/v1/mailgun_webhook', [MailgunController::class, 'webhook'])->middleware('throttle:1000,1');
Route::post('api/v1/mailgun_inbound_webhook', [MailgunController::class, 'inboundWebhook'])->middleware('throttle:1000,1');